Learn R Programming

llama (version 0.6)

parscores: Penalized average runtime score

Description

Calculates the penalized average runtime score which is commonly used for evaluating satisfiability solvers on a set of problems.

Usage

parscores(data, model, factor = 10, timeout)

Arguments

data
the data used to induce the model. The same as given to classify, classifyPairs, cluster or regression.
model
the algorithm selection model. Can be either a model returned by one of the model-building functions or a function that returns predictions such as vbs or the predictor function of a trained model.
factor
the penalization factor to use for non-successful choices. Default 10.
timeout
the timeout value to be multiplied by the penalization factor. If not specified, the maximum performance value of all algorithms on the entire data is used.

Value

  • A list of the penalized average runtimes.

Details

Returns the penalized average runtime performances of the respective chosen algorithm on each problem instance.

If feature costs have been given, the cost of the used features or feature groups is added to the performance of the chosen algorithm. The used features are determined by examining the the features member of data, not the model. If after that the performance value is above the timeout value, the timeout value multiplied by the factor is assumed.

See Also

misclassificationPenalties, successes

Examples

Run this code
library(RWeka)

data(satsolvers)
trainTest = cvFolds(satsolvers)

model = classify(classifier=J48, data=trainTest)
sum(parscores(trainTest, model))

# use factor of 5 instead of 10.
sum(parscores(trainTest, model, 5))

# explicitly specify timeout.
sum(parscores(trainTest, model, timeout = 3600))

Run the code above in your browser using DataLab