Example usage for weka.classifiers.functions SMO FILTER_STANDARDIZE

List of usage examples for weka.classifiers.functions SMO FILTER_STANDARDIZE

Introduction

In this page you can find the example usage for weka.classifiers.functions SMO FILTER_STANDARDIZE.

Prototype

int FILTER_STANDARDIZE

To view the source code for weka.classifiers.functions SMO FILTER_STANDARDIZE.

Click Source Link

Document

filter: Standardize training data

Usage

From source file:org.uclab.mm.icl.llc.config.RecognizerType.java

License:Apache License

/**
 * Returns the corresponding recognizer/*from  w  w  w. j  ava2 s .c  om*/
 * @param rec recognizer type to return
 * @param userID user ID to set
 * @return instance of the corresponding recognizer
 */
public LLCRecognizer getRecognizer(long userID) {

    RecognizerType rec = this.values()[value];
    switch (rec) {
    case SER:
        String[] labels = { "Anger", "Happiness", "Sadness" };
        String path = FileUtil.getRootPath() + "/training/modeldataV2.7.txt";
        SMO svm = new SMO(); // Define Classifier with Weka
        try {
            svm.setOptions(weka.core.Utils.splitOptions(
                    "-C 1.0 -L 0.0010 -P 1.0E-12 -N 1 -V -1 -W 1 -K \"weka.classifiers.functions.supportVector.RBFKernel -C 250007 -G 0.01\""));
            svm.setFilterType(new SelectedTag(SMO.FILTER_STANDARDIZE, SMO.TAGS_FILTER));
        } catch (Exception e) {
            e.printStackTrace();
        }
        ExtClassification classifier = new ExtClassification(path, 78 * 2, labels, svm);
        AudioEmotionRecognizer aer = new AudioEmotionRecognizer(classifier, path, userID);

        return aer;
    case ER:
        return new AudioEmotionRecognizerV(userID);
    case IAR:
        return new InertialActivityRecognizer(userID);
    case VAR:
        return new VideoActivityRecognizer(userID);
    case LR:
        //get user loc coord / label with userID by restful service
        return new GPSLocationRecognizer(userID);
    case FR:
        return new FoodRecognizer(userID);
    }
    return null;
}