subset-methods {performanceEstimation} | R Documentation |
Methods for Function subset
in Package performanceEstimation
Description
The method subset when applied to objects of class ComparisonResults
can
be used to obtain another object of the same class with a subset of
the estimation results contained in the original object.
Methods
signature(x = "ComparisonResults")
-
The method has as first argument the object of class
ComparisonResults
that you wish to subset. This method also includes 4 extra arguments that you can use to supply the subsetting criteria.Namely, the parameter
metrics
allows you to indicate a vector with the subset of evaluation metrics in the orginal object. Alternatively, you can provide a regular expression to be matched against the name of the statistics measured in the experiment (see functionmetricNames
) to specify the subset of metrics you want to select.The parameter
workflows
can be used to provide a vector with the subset of workflows (approaches to the predictive tasks) that are to be used in the sub-setting. Alternatively, you can also provide a regular expression to be matched against the name of the workflows (see functionworkflowNames
) evaluated in the experiment to specify the subset you want to select.The parameter
tasks
allows you to indicate a vector with the subset of predictive tasks to be extracted. Alternatively, you can provide a regular expression to be matched against the name of the tasks used in the experiment (see functiontaskNames
) to specify the subset you want to select.Finally, the parameter
partial
allows you to control how the names of the other parameters (tasks, workflows and metrics) are matched against the original names in theComparisonResults
object. It defaults toTRUE
which means that the functiongrep
is used, whilst withFALSE
the mathcin is done using the functionmatch
. For instance, if you have three metrics being estimated with names "F", "F1" and "F2", and you call subset withmetrics="F"
, this would in effect subset all three metrics, whilst withpartial=FALSE
only the first of the three would be considered.