|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.attributeSelection.ASEvaluation
weka.attributeSelection.SVMAttributeEval
public class SVMAttributeEval
SVMAttributeEval :
Evaluates the worth of an attribute by using an 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.
For more information see:
I. Guyon, J. Weston, S. Barnhill, V. Vapnik (2002). Gene selection for cancer classification using support vector machines. Machine Learning. 46:389-422.
@article{Guyon2002, author = {I. Guyon and J. Weston and S. Barnhill and V. Vapnik}, journal = {Machine Learning}, pages = {389-422}, title = {Gene selection for cancer classification using support vector machines}, volume = {46}, year = {2002} }Valid options are:
-X <constant rate of elimination> Specify the constant rate of attribute elimination per invocation of the support vector machine. Default = 1.
-Y <percent rate of elimination> Specify the percentage rate of attributes to elimination per invocation of the support vector machine. Trumps constant rate (above threshold). Default = 0.
-Z <threshold for percent elimination> Specify the threshold below which percentage attribute elimination reverts to the constant method.
-P <epsilon> Specify the value of P (epsilon parameter) to pass on to the support vector machine. Default = 1.0e-25
-T <tolerance> Specify the value of T (tolerance parameter) to pass on to the support vector machine. Default = 1.0e-10
-C <complexity> Specify the value of C (complexity parameter) to pass on to the support vector machine. Default = 1.0
-N Whether the SVM should 0=normalize/1=standardize/2=neither. (default 0=normalize)
Constructor Summary | |
---|---|
SVMAttributeEval()
Constructor |
Method Summary | |
---|---|
java.lang.String |
attsToEliminatePerIterationTipText()
Returns a tip text for this property suitable for display in the GUI |
void |
buildEvaluator(Instances data)
Initializes the evaluator. |
java.lang.String |
complexityParameterTipText()
Returns a tip text for this property suitable for display in the GUI |
java.lang.String |
epsilonParameterTipText()
Returns a tip text for this property suitable for display in the GUI |
double |
evaluateAttribute(int attribute)
Evaluates an attribute by returning the rank of the square of its coefficient in a linear support vector machine. |
java.lang.String |
filterTypeTipText()
Returns a tip text for this property suitable for display in the GUI |
int |
getAttsToEliminatePerIteration()
Get the constant rate of attribute elimination per iteration |
Capabilities |
getCapabilities()
Returns the capabilities of this evaluator. |
double |
getComplexityParameter()
Get the value of C used with SMO |
double |
getEpsilonParameter()
Get the value of P used with SMO |
SelectedTag |
getFilterType()
Get the filtering mode passed to SMO |
java.lang.String[] |
getOptions()
Gets the current settings of SVMAttributeEval |
int |
getPercentThreshold()
Get the threshold below which percentage elimination reverts to constant elimination. |
int |
getPercentToEliminatePerIteration()
Get the percentage rate of attribute elimination per iteration |
java.lang.String |
getRevision()
Returns the revision string. |
TechnicalInformation |
getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on. |
double |
getToleranceParameter()
Get the value of T used with SMO |
java.lang.String |
globalInfo()
Returns a string describing this attribute evaluator |
java.util.Enumeration |
listOptions()
Returns an enumeration describing all the available options |
static void |
main(java.lang.String[] args)
Main method for testing this class. |
java.lang.String |
percentThresholdTipText()
Returns a tip text for this property suitable for display in the GUI |
java.lang.String |
percentToEliminatePerIterationTipText()
Returns a tip text for this property suitable for display in the GUI |
void |
setAttsToEliminatePerIteration(int cRate)
Set the constant rate of attribute elimination per iteration |
void |
setComplexityParameter(double svmC)
Set the value of C for SMO |
void |
setEpsilonParameter(double svmP)
Set the value of P for SMO |
void |
setFilterType(SelectedTag newType)
The filtering mode to pass to SMO |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
void |
setPercentThreshold(int pThresh)
Set the threshold below which percentage elimination reverts to constant elimination. |
void |
setPercentToEliminatePerIteration(int pRate)
Set the percentage of attributes to eliminate per iteration |
void |
setToleranceParameter(double svmT)
Set the value of T for SMO |
java.lang.String |
toleranceParameterTipText()
Returns a tip text for this property suitable for display in the GUI |
java.lang.String |
toString()
Return a description of the evaluator |
Methods inherited from class weka.attributeSelection.ASEvaluation |
---|
forName, makeCopies, postProcess |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SVMAttributeEval()
Method Detail |
---|
public java.lang.String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface TechnicalInformationHandler
public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-X <constant rate of elimination> Specify the constant rate of attribute elimination per invocation of the support vector machine. Default = 1.
-Y <percent rate of elimination> Specify the percentage rate of attributes to elimination per invocation of the support vector machine. Trumps constant rate (above threshold). Default = 0.
-Z <threshold for percent elimination> Specify the threshold below which percentage attribute elimination reverts to the constant method.
-P <epsilon> Specify the value of P (epsilon parameter) to pass on to the support vector machine. Default = 1.0e-25
-T <tolerance> Specify the value of T (tolerance parameter) to pass on to the support vector machine. Default = 1.0e-10
-C <complexity> Specify the value of C (complexity parameter) to pass on to the support vector machine. Default = 1.0
-N Whether the SVM should 0=normalize/1=standardize/2=neither. (default 0=normalize)
setOptions
in interface OptionHandler
options
- the list of options as an array of strings
java.lang.Exception
- if an error occurspublic java.lang.String[] getOptions()
getOptions
in interface OptionHandler
public java.lang.String attsToEliminatePerIterationTipText()
public java.lang.String percentToEliminatePerIterationTipText()
public java.lang.String percentThresholdTipText()
public java.lang.String epsilonParameterTipText()
public java.lang.String toleranceParameterTipText()
public java.lang.String complexityParameterTipText()
public java.lang.String filterTypeTipText()
public void setAttsToEliminatePerIteration(int cRate)
cRate
- the constant rate of attribute elimination per iterationpublic int getAttsToEliminatePerIteration()
public void setPercentToEliminatePerIteration(int pRate)
pRate
- percent of attributes to eliminate per iterationpublic int getPercentToEliminatePerIteration()
public void setPercentThreshold(int pThresh)
pThresh
- percent of attributes to eliminate per iterationpublic int getPercentThreshold()
public void setEpsilonParameter(double svmP)
svmP
- the value of Ppublic double getEpsilonParameter()
public void setToleranceParameter(double svmT)
svmT
- the value of Tpublic double getToleranceParameter()
public void setComplexityParameter(double svmC)
svmC
- the value of Cpublic double getComplexityParameter()
public void setFilterType(SelectedTag newType)
newType
- the new filtering modepublic SelectedTag getFilterType()
public Capabilities getCapabilities()
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class ASEvaluation
Capabilities
public void buildEvaluator(Instances data) throws java.lang.Exception
buildEvaluator
in class ASEvaluation
data
- set of instances serving as training data
java.lang.Exception
- if the evaluator has not been
generated successfullypublic double evaluateAttribute(int attribute) throws java.lang.Exception
evaluateAttribute
in interface AttributeEvaluator
attribute
- the index of the attribute to be evaluated
java.lang.Exception
- if the attribute could not be evaluatedpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class ASEvaluation
public static void main(java.lang.String[] args)
args
- the options
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |