All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.attributeSelection.SVMAttributeEval

java.lang.Object
    |
    +----weka.attributeSelection.ASEvaluation
            |
            +----weka.attributeSelection.AttributeEvaluator
                    |
                    +----weka.attributeSelection.SVMAttributeEval

public class SVMAttributeEval
extends AttributeEvaluator
implements OptionHandler
Class for Evaluating attributes individually by using the SVM classifier. Attributes are ranked by the square of the weight assigned by the SVM. Attribute selection for multiclass problems is handled by ranking attributes for each class seperately using a one-vs-all method and then "dealing" from the top of each pile to give a final ranking.

Valid options are:

-X
Specify constant rate at which attributes are eliminated per invocation of the support vector machine. Default = 1.

-Y
Specify the percentage rate at which attributes are eliminated per invocation of the support vector machine. This setting trumps the constant rate setting. Default = 0 (percentage rate ignored).

-Z
Specify the threshold below which the percentage elimination method reverts to the constant elimination method.

-C
Specify the value of C - the complexity parameter to be passed on to the support vector machine.

-P
Sets the epsilon for round-off error. (default 1.0e-25)

-T
Sets the tolerance parameter. (default 1.0e-10)

Version:
$Revision: 1.15 $
Author:
Eibe Frank (eibe@cs.waikato.ac.nz)
Author:
Mark Hall (mhall@cs.waikato.ac.nz)

Constructor Index

 o SVMAttributeEval()
Constructor

Method Index

 o attsToEliminatePerIterationTipText()
Returns a tip text for this property suitable for display in the GUI
 o buildEvaluator(Instances)
Initializes the evaluator.
 o complexityParameterTipText()
Returns a tip text for this property suitable for display in the GUI
 o epsilonParameterTipText()
Returns a tip text for this property suitable for display in the GUI
 o evaluateAttribute(int)
Evaluates an attribute by returning the rank of the square of its coefficient in a linear support vector machine.
 o filterTypeTipText()
Returns a tip text for this property suitable for display in the GUI
 o getAttsToEliminatePerIteration()
Get the constant rate of attribute elimination per iteration
 o getComplexityParameter()
Get the value of C used with SMO
 o getEpsilonParameter()
Get the value of P used with SMO
 o getFilterType()
Get the filtering mode passed to SMO
 o getOptions()
Gets the current settings of SVMAttributeEval
 o getPercentThreshold()
Get the threshold below which percentage elimination reverts to constant elimination.
 o getPercentToEliminatePerIteration()
Get the percentage rate of attribute elimination per iteration
 o getToleranceParameter()
Get the value of T used with SMO
 o globalInfo()
Returns a string describing this attribute evaluator
 o listOptions()
Returns an enumeration describing all the available options
 o main(String[])
Main method for testing this class.
 o percentThresholdTipText()
Returns a tip text for this property suitable for display in the GUI
 o percentToEliminatePerIterationTipText()
Returns a tip text for this property suitable for display in the GUI
 o setAttsToEliminatePerIteration(int)
Set the constant rate of attribute elimination per iteration
 o setComplexityParameter(double)
Set the value of C for SMO
 o setEpsilonParameter(double)
Set the value of P for SMO
 o setFilterType(SelectedTag)
The filtering mode to pass to SMO
 o setOptions(String[])
Parses a given list of options Valid options are:

-X
Specify constant rate at which attributes are eliminated per invocation of the support vector machine.

 o setPercentThreshold(int)
Set the threshold below which percentage elimination reverts to constant elimination.
 o setPercentToEliminatePerIteration(int)
Set the percentage of attributes to eliminate per iteration
 o setToleranceParameter(double)
Set the value of T for SMO
 o toleranceParameterTipText()
Returns a tip text for this property suitable for display in the GUI
 o toString()
Return a description of the evaluator

Constructor Detail

 o SVMAttributeEval
public SVMAttributeEval()
          Constructor

Method Detail

 o globalInfo
public java.lang.String globalInfo()
          Returns a string describing this attribute evaluator
Returns:
a description of the evaluator suitable for displaying in the explorer/experimenter gui
 o listOptions
public java.util.Enumeration listOptions()
          Returns an enumeration describing all the available options
Returns:
an enumeration of options
 o setOptions
public void setOptions(java.lang.String options[]) throws java.lang.Exception
          Parses a given list of options Valid options are:

-X
Specify constant rate at which attributes are eliminated per invocation of the support vector machine. Default = 1.

-Y
Specify the percentage rate at which attributes are eliminated per invocation of the support vector machine. This setting trumps the constant rate setting. Default = 0 (percentage rate ignored).

-Z
Specify the threshold below which the percentage elimination method reverts to the constant elimination method.

-C
Specify the value of C - the complexity parameter to be passed on to the support vector machine.

-P
Sets the epsilon for round-off error. (default 1.0e-25)

-T
Sets the tolerance parameter. (default 1.0e-10)

-N <0|1|2>
Whether the SVM should 0=normalize/1=standardize/2=neither. (default 0=normalize)

Parameters:
options - the list of options as an array of strings
Throws:
java.lang.Exception - if an error occurs
 o getOptions
public java.lang.String[] getOptions()
          Gets the current settings of SVMAttributeEval
Returns:
an array of strings suitable for passing to setOptions()
 o attsToEliminatePerIterationTipText
public java.lang.String attsToEliminatePerIterationTipText()
          Returns a tip text for this property suitable for display in the GUI
Returns:
tip text string describing this property
 o percentToEliminatePerIterationTipText
public java.lang.String percentToEliminatePerIterationTipText()
          Returns a tip text for this property suitable for display in the GUI
Returns:
tip text string describing this property
 o percentThresholdTipText
public java.lang.String percentThresholdTipText()
          Returns a tip text for this property suitable for display in the GUI
Returns:
tip text string describing this property
 o epsilonParameterTipText
public java.lang.String epsilonParameterTipText()
          Returns a tip text for this property suitable for display in the GUI
Returns:
tip text string describing this property
 o toleranceParameterTipText
public java.lang.String toleranceParameterTipText()
          Returns a tip text for this property suitable for display in the GUI
Returns:
tip text string describing this property
 o complexityParameterTipText
public java.lang.String complexityParameterTipText()
          Returns a tip text for this property suitable for display in the GUI
Returns:
tip text string describing this property
 o filterTypeTipText
public java.lang.String filterTypeTipText()
          Returns a tip text for this property suitable for display in the GUI
Returns:
tip text string describing this property
 o setAttsToEliminatePerIteration
public void setAttsToEliminatePerIteration(int cRate)
          Set the constant rate of attribute elimination per iteration
Parameters:
X - the constant rate of attribute elimination per iteration
 o getAttsToEliminatePerIteration
public int getAttsToEliminatePerIteration()
          Get the constant rate of attribute elimination per iteration
Returns:
the constant rate of attribute elimination per iteration
 o setPercentToEliminatePerIteration
public void setPercentToEliminatePerIteration(int pRate)
          Set the percentage of attributes to eliminate per iteration
Parameters:
Y - percent of attributes to eliminate per iteration
 o getPercentToEliminatePerIteration
public int getPercentToEliminatePerIteration()
          Get the percentage rate of attribute elimination per iteration
Returns:
the percentage rate of attribute elimination per iteration
 o setPercentThreshold
public void setPercentThreshold(int pThresh)
          Set the threshold below which percentage elimination reverts to constant elimination.
Parameters:
thresh - percent of attributes to eliminate per iteration
 o getPercentThreshold
public int getPercentThreshold()
          Get the threshold below which percentage elimination reverts to constant elimination.
Returns:
the threshold below which percentage elimination stops
 o setEpsilonParameter
public void setEpsilonParameter(double svmP)
          Set the value of P for SMO
Parameters:
svmP - the value of P
 o getEpsilonParameter
public double getEpsilonParameter()
          Get the value of P used with SMO
Returns:
the value of P
 o setToleranceParameter
public void setToleranceParameter(double svmT)
          Set the value of T for SMO
Parameters:
svmC - the value of T
 o getToleranceParameter
public double getToleranceParameter()
          Get the value of T used with SMO
Returns:
the value of T
 o setComplexityParameter
public void setComplexityParameter(double svmC)
          Set the value of C for SMO
Parameters:
svmC - the value of C
 o getComplexityParameter
public double getComplexityParameter()
          Get the value of C used with SMO
Returns:
the value of C
 o setFilterType
public void setFilterType(SelectedTag newType)
          The filtering mode to pass to SMO
Parameters:
newType - the new filtering mode
 o getFilterType
public SelectedTag getFilterType()
          Get the filtering mode passed to SMO
Returns:
the filtering mode
 o buildEvaluator
public void buildEvaluator(Instances data) throws java.lang.Exception
          Initializes the evaluator.
Parameters:
data - set of instances serving as training data
Throws:
java.lang.Exception - if the evaluator has not been generated successfully
Overrides:
buildEvaluator in class ASEvaluation
 o evaluateAttribute
public double evaluateAttribute(int attribute) throws java.lang.Exception
          Evaluates an attribute by returning the rank of the square of its coefficient in a linear support vector machine.
Parameters:
attribute - the index of the attribute to be evaluated
Throws:
java.lang.Exception - if the attribute could not be evaluated
Overrides:
evaluateAttribute in class AttributeEvaluator
 o toString
public java.lang.String toString()
          Return a description of the evaluator
Returns:
description as a string
Overrides:
toString in class java.lang.Object
 o main
public static void main(java.lang.String args[])
          Main method for testing this class.
Parameters:
args - the options

All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home