Example usage for weka.attributeSelection ConsistencySubsetEval ConsistencySubsetEval

List of usage examples for weka.attributeSelection ConsistencySubsetEval ConsistencySubsetEval

Introduction

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

Prototype

public ConsistencySubsetEval() 

Source Link

Document

Constructor.

Usage

From source file:com.rapidminer.operator.validation.ConsistencyFeatureSetEvaluator.java

License:Open Source License

public IOObject[] apply() throws OperatorException {
    ExampleSet exampleSet = getInput(ExampleSet.class);
    Instances instances = WekaTools.toWekaInstances(exampleSet, "TempInstances", WekaInstancesAdaptor.LEARNING);
    double performance = 0.0d;
    try {// w  ww. j  a v a  2  s  .  com
        ConsistencySubsetEval evaluator = new ConsistencySubsetEval();
        evaluator.buildEvaluator(instances);
        BitSet bitSet = new BitSet(exampleSet.getAttributes().size());
        bitSet.flip(0, exampleSet.getAttributes().size());
        performance = evaluator.evaluateSubset(bitSet);
    } catch (Exception e) {
        throw new UserError(this, e, 905, new Object[] { "ConsistencySubsetEval", e.getMessage() });
    }
    PerformanceVector result = new PerformanceVector();
    result.addCriterion(new EstimatedPerformance("ConsistencyFS", performance, 1, false));
    return new IOObject[] { result };
}