Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

calculating RMSE, Rsquared with caret in R

library(caret)
# datasets:
original = c( -2,  1, -3, 2, 3, 5, 4, 6, 5, 6, 7)
predicted = c(-1, -1, -2, 2, 3, 4, 4, 5, 5, 7, 7)

# caret package functions 
RMSE(predicted, original)
R2(predicted, original, form = "traditional")
[1] 0.904534
Source by www.datatechnotes.com #
 
PREVIOUS NEXT
Tagged: #calculating #Rsquared #caret #R
ADD COMMENT
Topic
Name
5+7 =