org.android.activityminer.logic.classification
Interface Classifier

Package class diagram package Classifier
All Known Implementing Classes:
KNN

public interface Classifier

Interface for classifiers.


Method Summary
 PredictionResult classify(Activity activity)
          Does classify the given sample
 void fromPMMLModelElements(List<ModelElement> modelElements, ActivityMinerExtension extension)
          Method to create the classifier model from PMML model elements.
 String getDescription(Context context)
          Getter for a significant description of the configured classifier.
 List<ModelElement> toPMMLModelElements(Context context, DataDictionary dataDictionary)
          Getter for the PMML model elements.
 void train(Set<? extends Activity> trainingSet)
          Does initialize and train the classifier (internal model creation)
 

Method Detail

train

void train(Set<? extends Activity> trainingSet)
Does initialize and train the classifier (internal model creation)

Parameters:
trainingSet - the training set

classify

PredictionResult classify(Activity activity)
Does classify the given sample

Parameters:
activity - the activity to classify
Returns:
the predicted class identifier or -1 if no prediction is made

getDescription

String getDescription(Context context)
Getter for a significant description of the configured classifier.

Parameters:
context - the context
Returns:
the description of this classifier instance

toPMMLModelElements

List<ModelElement> toPMMLModelElements(Context context,
                                       DataDictionary dataDictionary)
Getter for the PMML model elements. The mining schema and the output fields can be ignored, they will be overridden by the calling instance based on the actual configuration.

Parameters:
context - the context
dataDictionary - the data dictionary
Returns:
the PMML model

fromPMMLModelElements

void fromPMMLModelElements(List<ModelElement> modelElements,
                           ActivityMinerExtension extension)
Method to create the classifier model from PMML model elements.

Parameters:
modelElements - the model elements to build model from
extension - the activity mine specific extensions