MLWizard API

back to main page

The implementation of MLWizard is divided into core functionality and the GUI components. The three main functionalities of MLWizard can also be easily accessed via an API.

| Sample Usage:
ExampleSet dataset = ... // e.g. using RapidMiner file readers
KnowledgeBase knowledgeBase = KnowledgeBase.read();
// predicting the accuracies of all included classifiers
RegressionResult result = Regressioner.predict(knowledgeBase, dataset);
// evaluating a set of classifiers
Evaluator evaluator = new Evaluator();
Iterable<Classifier> classifiers = ... // e.g. knowledgeBase.getClassifiers()
Map<Classifier, ParameterSet> result = evaluator.evaluate(classifiers, result.metaFeatures, knowledgeBase, dataset, nThreads);
// constructing the final system
String path = .. // path where the dataset was read from
Process process = SystemConstructor.createProcess(classifier, parameterSet, path);

The API reference documentation (Javadoc) can be found here.

Accuracy Prediction

The accuracy prediction takes a dataset and a knowledge base and returns a result object that contains the predicted accuracies for all classifiers and the computed meta-features of the dataset.

predict(KnowledgeBase knowledgeBase, ExampleSet dataset) : RegressionResult

Class: Regressioner

Evaluation

The optimization takes mainly three arguments: a knowledge base, a list of classifiers, the dataset, and the meta-features of the dataset. The result are the optimized parameter values for all considered classifiers.

evaluate(Iterable<Classifier> classifiers, Example queryMetaFeatures, KnowledgeBase knowledgeBase, ExampleSet dataset, int nThreads, EvaluationListener evaluationListener) : Map<String, ParameterSet>

Class: Evaluator

System Construction

Finally, the system construction takes a classifier, its parameter values to use, and the location of the dataset. The result is a RapidMiner process.

createProcess(Classifier classifier, ParameterSet parameterSet, String datasetLocation) : Process

Class: SystemConstructor

Knowledge Base

Additionally, it is possible to modify the knowledge base, that serves as a basis for all meta-learning methods. It is easily possible to add new datasets and classifiers. If a new dataset is added, all existing classifiers will be evaluated on this dataset. Analogically, if a new classifier is added, it is evaluated on all included datasets. The resulting performance values and optimized parameter values are added to the knowledge base as well in order to improve further meta-learning runs.

The knowledge base included in the jar-File can be loaded very easily:

KnowledgeBase knowledgeBase = KnowledgeBase.read();

Class: KnowledgeBase

Meta-Features

The computation of the meta-features for a dataset can be accessed via the according RapidMiner Operator included in the MLWizard release. The operator can be used within the GUI and programmatically.

MetaFeaturesOperator metaFeaturesOperator = OperatorService.createOperator(MetaFeaturesOperator.class);
ExampleSet metaFeatures = metaFeaturesOperator.apply(dataset);

CLass: MetaFeaturesOperator

back to main page

     
Last modified:: 05.07.2012