Description Usage Arguments Value References See Also Examples
This function provides a set of descriptive statistics for each evaluation metric that is estimated on an experimental comparison. These statistics are obtained for a particular learner, and for one of the prediction problems involved in the experimental comparison.
1 | getSummaryResults(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 function returns a matrix with the rows representing summary statistics of the scores obtained by the model on the different iterations, and the columns representing the evaluation statistics estimated in the experiment.
Torgo, L. (2010) Data Mining using R: learning with case studies, CRC Press (ISBN: 9781439810187).
http://www.dcc.fc.up.pt/~ltorgo/DataMiningWithR
getFoldsResults
, 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 statistics of a specific learner
getSummaryResults(results,'cv.rpartXse.v1','swiss')
## Get the statistics of the learner that obtained the best NMSE on the
## swiss data set
getSummaryResults(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.