Example usage for weka.attributeSelection InfoGainAttributeEval buildEvaluator

List of usage examples for weka.attributeSelection InfoGainAttributeEval buildEvaluator

Introduction

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

Prototype

@Override
public void buildEvaluator(Instances data) throws Exception 

Source Link

Document

Initializes an information gain attribute evaluator.

Usage

From source file:Helper.CustomFilter.java

public Instances removeAttribute(Instances structure) throws Exception {
    //NORMALIZE AND REMOVE USELESS ATTRIBUTES
    Normalize norm = new Normalize();
    norm.setInputFormat(structure);/*from   ww  w .  ja  va  2 s . c o m*/
    structure = Filter.useFilter(structure, norm);

    RemoveUseless ru = new RemoveUseless();
    ru.setInputFormat(structure);
    structure = Filter.useFilter(structure, ru);

    Ranker rank = new Ranker();
    InfoGainAttributeEval eval = new InfoGainAttributeEval();
    eval.buildEvaluator(structure);
    //END OF NORMALIZATION

    return structure;
}