Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


performanceEstimation (version 1.1.0)

results2table: Obtains a dplyr data frame table object containing all the results of an experiment

Description

This function produces a dplyr data frame table object with the information on all iterations of an experiment. This type of objects may be easier to manipulate in terms of querying these results, particular for larger experiments involving lots of tasks, workflows and metrics.

Usage

results2table(res)

Arguments

res
This is a ComparisonResults object (type "class?ComparisonResults" for details) that contains the results of a performance estimation experiment obtained through the performanceEstimation() function.

Value

The function returns a dplyr data frame table object containing all resutls of the experiment. The object has the columns: Task, Workflow, nrIt, Metric and Score. Each row is one train+test cycle within the experiment, i.e. contains the score of some metric obtained by some workflow on one train+test iteration of a task.

References

Torgo, L. (2014) An Infra-Structure for Performance Estimation and Experimental Comparison of Predictive Models in R. arXiv:1412.0436 [cs.MS] http://arxiv.org/abs/1412.0436

See Also

getScores, performanceEstimation

Examples

Run this code
## 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