expSubset

Obtains a subset of an experiment matching the given conditions

Usage

expSubset(e, columns, invertSelection = FALSE)

Arguments

e
The experiment to be subsetted
columns
A named list containing the variables to be filtered and the valid values.
invertSelection
If the filtering must match the inversion of the specified conditions.

Value

a filtered experiment object

Description

This function receives a named list indicating variables and values to filter the input experiment.

Details

The names of the elements in the list correspond with the variables to be filtered, indicating either the methos or problem variables as well as parameters. The values of the list correspond with the valid states for the filtering.

Examples

# We create a new experiment from the wekaExperiment problem e <- expCreate(wekaExperiment, parameters="fold", name="Test Experiment") # We can filter the experiment to reduce the number of methods. e <- expSubset(e, list(method = c("J48", "NaiveBayes"))) e
#Experiment name: Test Experiment #method: J48, NaiveBayes, OneR, RandomForest #problem: anneal, audiology, balance-scale, car, glass, horsecolic, hypothyroid, ionosphere, liver-disorders, lymph, primary-tumor, soybean, vehicle, vote, vowel #parameters: *) featureSelection [no,yes] *) fold [0,1,2,3,4,5,6,7,8,9] #outputs: accuracy, trainingTime
# We can filter the experiment to remove a given problem e <- expSubset(e, list(problem = "iris"), invertSelection=TRUE) e
#Experiment name: Test Experiment #method: J48, NaiveBayes, OneR, RandomForest #problem: anneal, audiology, balance-scale, car, glass, horsecolic, hypothyroid, ionosphere, liver-disorders, lymph, primary-tumor, soybean, vehicle, vote, vowel #parameters: *) featureSelection [no,yes] *) fold [0,1,2,3,4,5,6,7,8,9] #outputs: accuracy, trainingTime
# We can subset the experiment to obtain a specific parameter configuration e <- expSubset(e, list("featureSelection" = "no")) e
#Experiment name: Test Experiment #method: J48, NaiveBayes, OneR, RandomForest #problem: anneal, audiology, balance-scale, car, glass, horsecolic, hypothyroid, ionosphere, liver-disorders, lymph, primary-tumor, soybean, vehicle, vote, vowel #parameters: *) featureSelection [no,yes] *) fold [0,1,2,3,4,5,6,7,8,9] #outputs: accuracy, trainingTime

Back to top

Built by staticdocs. Styled with bootstrap.