====== MLWizard API ======
[[rapidminer:mlwizard|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.
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 classifiers = ... // e.g. knowledgeBase.getClassifiers()
Map 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 [[http://www.dfki.uni-kl.de/~reif/mlwizard_javadoc/|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
[[http://www.dfki.uni-kl.de/~reif/mlwizard_javadoc/de/dfki/madm/mlwizard/functionality/Regressioner.html|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 classifiers, Example queryMetaFeatures, KnowledgeBase knowledgeBase, ExampleSet dataset, int nThreads, EvaluationListener evaluationListener) : Map
[[http://www.dfki.uni-kl.de/~reif/mlwizard_javadoc/de/dfki/madm/mlwizard/functionality/Evaluator.html|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
[[http://www.dfki.uni-kl.de/~reif/mlwizard_javadoc/de/dfki/madm/mlwizard/functionality/SystemConstructor.html|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();
[[http://www.dfki.uni-kl.de/~reif/mlwizard_javadoc/de/dfki/madm/mlwizard/KnowledgeBase.html|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);
[[http://www.dfki.uni-kl.de/~reif/mlwizard_javadoc/de/dfki/madm/mlwizard/metafeatures/MetaFeaturesOperator.html|CLass: MetaFeaturesOperator]]
[[rapidminer:mlwizard|back to main page]]