Description Usage Arguments Value References See Also Examples
This function allows you to obtain the scores obtained by a learner on the different iterations that form an experimental comparison. These scores are obtained for a particular data set of this comparison.
1 | getFoldsResults(results,learner,dataSet)
|
results |
This is a |
learner |
This is the string that identifies the learner. |
dataSet |
The string that identifies the data set for which you want to get the scores. |
The result of the function is a matrix with as many columns as there are evaluation statistics in the experimental comparison, and with as many rows as there are iterations in this experiment. The values on this matrix are the scores of the learner for respective statistic on the different iterations of the process.
Torgo, L. (2010) Data Mining using R: learning with case studies, CRC Press (ISBN: 9781439810187).
http://www.dcc.fc.up.pt/~ltorgo/DataMiningWithR
getSummaryResults
, experimentalComparison
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ## Estimating several evaluation metrics on different variants of a
## regression tree on a data set, using one repetition of 10-fold CV
data(swiss)
## First the user defined functions
cv.rpartXse <- function(form, train, test, ...) {
require(DMwR)
t <- rpartXse(form, train, ...)
p <- predict(t, test)
mse <- mean((p - resp(form, test))^2)
c(nmse = mse/mean((mean(resp(form, train)) - resp(form, test))^2),
mse = mse)
}
results <- experimentalComparison(
c(dataset(Infant.Mortality ~ ., swiss)),
c(variants('cv.rpartXse',se=c(0,0.5,1))),
cvSettings(1,10,1234)
)
## Get the scores of a specific learner
getFoldsResults(results,'cv.rpartXse.v1','swiss')
## Get the scores of the learner that obtained the best NMSE on the
## swiss data set
getFoldsResults(results,bestScores(results)$swiss['nmse','system'],'swiss')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.