我需要一些帮助来了解以下代码的结果:
library(caret)
ctrl <- trainControl(method = "cv", savePred=T)
mod <- train(Sepal.Length~., data=iris, method = "svmRadial", trControl = ctrl)
#pred_test <-predict(mod,iris)
head(mod$pred)
mod
这是结果:
pred obs rowIndex sigma C Resample
1 4.879055 4.7 30 1.781273 0.25 Fold01
2 5.230893 4.9 38 1.781273 0.25 Fold01
3 5.268827 5.0 44 1.781273 0.25 Fold01
4 4.947738 5.0 50 1.781273 0.25 Fold01
5 6.085828 6.6 76 1.781273 0.25 Fold01
6 5.524783 5.7 80 1.781273 0.25 Fold01
Support Vector Machines with Radial Basis Function Kernel
150 samples
4 predictor
No pre-processing
Resampling: Cross-Validated (10 fold)
Summary of sample sizes: 135, 135, 136, 135, 136, 136, ...
Resampling results across tuning parameters:
C RMSE Rsquared MAE
0.25 0.4670729 0.7307655 0.3478073
0.50 0.4376385 0.7559361 0.3300692
1.00 0.4185441 0.7755009 0.3144116
问题1:pred
是什么?
问题2:Rsquared
是什么?
谢谢!