2

I added r2 value and the formula of the regression function but I also want RMSE value on my plot, maybe I need to add something but I could not see a proper answer to this question neither here nor google...

ggplot(data = AGB.rf$pred) + 
  geom_point(mapping = aes(x = pred, y = obs, color = pred, shape=1))+
  geom_smooth(mapping = aes(x = pred, y = obs), method="lm", se = FALSE)+
  stat_cor(aes(x = pred, y = obs, label =  ..rr.label..),label.y = 3000)+ 
  #stat_regline_equation(aes(x = pred, y = obs),label.y = 2700)+ 
  labs(title = "Predicted Values vs. Observed Values with Random Forest Model", x = "Predicted AGB", y="Observed AGB")+
  theme_light() + scale_shape_identity()
RS_girl
  • 21
  • 1

0 Answers0