Example usage for weka.attributeSelection ASEvaluation forName

List of usage examples for weka.attributeSelection ASEvaluation forName

Introduction

In this page you can find the example usage for weka.attributeSelection ASEvaluation forName.

Prototype

public static ASEvaluation forName(String evaluatorName, String[] options) throws Exception 

Source Link

Document

Creates a new instance of an attribute/subset evaluator given it's class name and (optional) arguments to pass to it's setOptions method.

Usage

From source file:com.rapidminer.operator.features.weighting.GenericWekaAttributeWeighting.java

License:Open Source License

/**
 * Returns the Weka attribute evaluator based on the subtype of this
 * operator.// w  w w .  java  2 s  .c  o m
 */
private ASEvaluation getWekaAttributeEvaluator(String prefixName, String[] parameters)
        throws OperatorException {
    String actualName = prefixName.substring(WekaTools.WEKA_OPERATOR_PREFIX.length());
    String evaluatorName = null;
    for (int i = 0; i < WEKA_ATTRIBUTE_EVALUATORS.length; i++) {
        if (WEKA_ATTRIBUTE_EVALUATORS[i].endsWith(actualName)) {
            evaluatorName = WEKA_ATTRIBUTE_EVALUATORS[i];
            break;
        }
    }
    ASEvaluation evaluator = null;
    try {
        evaluator = (ASEvaluation) ASEvaluation.forName(evaluatorName, parameters);
    } catch (Exception e) {
        throw new UserError(this, e, 904, new Object[] { evaluatorName, e });
    }
    return evaluator;
}

From source file:mlflex.WekaInMemoryLearner.java

License:Open Source License

private static ASEvaluation GetAttributeEvaluator(ArrayList<String> algorithmParameters) throws Exception {
    return ASEvaluation.forName(algorithmParameters.get(0), algorithmParameters.get(1).split(" "));
}