
Last chance! 50% off unlimited learning
Sale ends in
results2table(res)
ComparisonResults
object (type "class?ComparisonResults" for details)
that contains the results of a performance estimation experiment obtained
through the performanceEstimation()
function.
getScores
, performanceEstimation
## Not run:
# ## Estimating MSE for 3 variants of both
# ## regression trees and SVMs, on two data sets, using one repetition
# ## of 10-fold CV
# library(e1071)
# data(swiss)
#
# ## running the estimation experiment
# res <- performanceEstimation(
# PredTask(Infant.Mortality ~ .,swiss,"Swiss"),
# workflowVariants(learner="svm",
# learner.pars=list(cost=c(1,10),gamma=c(0.01,0.5))),
# EstimationTask(metrics=c("mse","nmae"),method=CV(nReps=2,nFolds=5))
# )
#
# ## Obtaining a table with the results
# library(dplyr)
# tbl <- results2table(res)
#
# ## Mean and standard deviation of each workflow per task (only one in
# ## this example) and metric
# group_by(tbl,Task,Workflow,Metric)
# summarize_each_(funs(mean,sd),"Score")
#
# ## Top 2 workflows in terms of MSE for this task
# filter(tbl,Task=="Swiss",Metric=="mse")
# group_by(Workflow)
# summarize_each_(funs(mean),"Score")
# arrange(Score)
# slice(1:2)
# ## End(Not run)
Run the code above in your browser using DataLab