Learn R Programming

llama (version 0.6)

successes: Success

Description

Was the problem solved successfully using the chosen algorithm?

Usage

successes(data, model, 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.
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 success values.

Details

Returns TRUE if the chosen algorithm successfully solved the problem instance, FALSE otherwise for 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, FALSE is assumed. If whether an algorithm was successful is not determined by performance and feature costs, don't pass costs when creating the LLAMA data frame.

See Also

misclassificationPenalties, parscores

Examples

Run this code
library(RWeka)

data(satsolvers)
trainTest = cvFolds(satsolvers)

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

Run the code above in your browser using DataLab