ca.uottawa.balie
Class WekaAttributeSelection

java.lang.Object
  extended by ca.uottawa.balie.WekaAttributeSelection

public class WekaAttributeSelection
extends java.lang.Object

Methods to select the top attributes from a given classification problem.

Author:
nadeaud

Field Summary
static int DEFAULT_NUM_ATTRIBUTES
           
static int WEKA_CHI_SQUARE
           
static int WEKA_INFO_GAIN
           
static int WEKA_ONER
           
static int WEKA_RELIEF
           
static int WEKA_SVM
           
static int WEKA_SYM_UNCERT
           
static int WEKA_WRAPPER
           
 
Constructor Summary
WekaAttributeSelection(int pi_Evaluator, WekaAttribute[] pi_Attributes, java.lang.String[] pi_ClassAttributes)
          Creates an Attribute selection framework.
 
Method Summary
 void AddInstance(java.lang.Object[] pi_Instance, java.lang.String pi_Class)
          Add an instance, that is a vector of value for all attributes.
 weka.core.FastVector GetAttribute()
           
 java.lang.String[] GetAttributeList()
           
static void main(java.lang.String[] args)
          Test routine.
 void NumAttributes(int pi_Num)
          Sets the number of top attribute to select.
 java.lang.String[] ReduceDimentionality()
          Gets the array of chosen attributes
 void Select(boolean pi_Debug)
          Select the top attributes
 void SetDoubleOnly(boolean b)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WEKA_CHI_SQUARE

public static final int WEKA_CHI_SQUARE
See Also:
Constant Field Values

WEKA_INFO_GAIN

public static final int WEKA_INFO_GAIN
See Also:
Constant Field Values

WEKA_WRAPPER

public static final int WEKA_WRAPPER
See Also:
Constant Field Values

WEKA_SYM_UNCERT

public static final int WEKA_SYM_UNCERT
See Also:
Constant Field Values

WEKA_SVM

public static final int WEKA_SVM
See Also:
Constant Field Values

WEKA_RELIEF

public static final int WEKA_RELIEF
See Also:
Constant Field Values

WEKA_ONER

public static final int WEKA_ONER
See Also:
Constant Field Values

DEFAULT_NUM_ATTRIBUTES

public static final int DEFAULT_NUM_ATTRIBUTES
See Also:
Constant Field Values
Constructor Detail

WekaAttributeSelection

public WekaAttributeSelection(int pi_Evaluator,
                              WekaAttribute[] pi_Attributes,
                              java.lang.String[] pi_ClassAttributes)
Creates an Attribute selection framework.

Parameters:
pi_Evaluator - Type of evaluation of attributes merit
pi_Attributes - The attributes to evaluate
pi_ClassAttributes - The class attribute
Method Detail

AddInstance

public void AddInstance(java.lang.Object[] pi_Instance,
                        java.lang.String pi_Class)
Add an instance, that is a vector of value for all attributes.

Parameters:
pi_Instance - The instance, an array of objects (can mix numeric and nominal attributes - see WekaAttribute)
pi_Class - The class for this instance
See Also:
WekaAttribute

NumAttributes

public void NumAttributes(int pi_Num)
Sets the number of top attribute to select.

Parameters:
pi_Num - Num of attributes to select

GetAttributeList

public java.lang.String[] GetAttributeList()

GetAttribute

public weka.core.FastVector GetAttribute()

SetDoubleOnly

public void SetDoubleOnly(boolean b)

Select

public void Select(boolean pi_Debug)
Select the top attributes


ReduceDimentionality

public java.lang.String[] ReduceDimentionality()
Gets the array of chosen attributes

Returns:
A String array where each element is the label of a chosen attribute (see WekaAttribute).
See Also:
WekaAttribute

main

public static void main(java.lang.String[] args)
Test routine.

Parameters:
args -