All Packages Class Hierarchy This Package Previous Next Index WEKA's home
java.lang.Object | +----weka.attributeSelection.ASEvaluation | +----weka.attributeSelection.AttributeEvaluator | +----weka.attributeSelection.ReliefFAttributeEval
For more information see:
Kira, K. and Rendell, L. A. (1992). A practical approach to feature selection. In D. Sleeman and P. Edwards, editors, Proceedings of the International Conference on Machine Learning, pages 249-256. Morgan Kaufmann.
Kononenko, I. (1994). Estimating attributes: analysis and extensions of Relief. In De Raedt, L. and Bergadano, F., editors, Machine Learning: ECML-94, pages 171-182. Springer Verlag.
Marko Robnik Sikonja, Igor Kononenko: An adaptation of Relief for attribute estimation on regression. In D.Fisher (ed.): Machine Learning, Proceedings of 14th International Conference on Machine Learning ICML'97, Nashville, TN, 1997.
Valid options are:
-M
-D
-K
-W
-A
-M
-D
-K
-W
-A
Specify the number of instances to sample when estimating attributes.
If not specified then all instances will be used.
Seed for randomly sampling instances.
Number of nearest neighbours to use for estimating attributes.
(Default is 10).
Weight nearest neighbours by distance.
Specify sigma value (used in an exp function to control how quickly
weights decrease for more distant instances). Use in conjunction with
-W. Sensible values = 1/5 to 1/10 the number of nearest neighbours.
ReliefFAttributeEval()
buildEvaluator(Instances)
evaluateAttribute(int)
getNumNeighbours()
getOptions()
getSampleSize()
getSeed()
getSigma()
getWeightByDistance()
globalInfo()
listOptions()
main(String[])
numNeighboursTipText()
sampleSizeTipText()
seedTipText()
setNumNeighbours(int)
setOptions(String[])
setSampleSize(int)
setSeed(int)
setSigma(int)
setWeightByDistance(boolean)
sigmaTipText()
toString()
weightByDistanceTipText()
ReliefFAttributeEval
public ReliefFAttributeEval()
Constructor
globalInfo
public java.lang.String globalInfo()
Returns a string describing this attribute evaluator
listOptions
public java.util.Enumeration listOptions()
Returns an enumeration describing the available options
setOptions
public void setOptions(java.lang.String options[]) throws java.lang.Exception
Parses a given list of options.
Valid options are:
Specify the number of instances to sample when estimating attributes.
If not specified then all instances will be used.
Seed for randomly sampling instances.
Number of nearest neighbours to use for estimating attributes.
(Default is 10).
Weight nearest neighbours by distance.
Specify sigma value (used in an exp function to control how quickly
weights decrease for more distant instances). Use in conjunction with
-W. Sensible values = 1/5 to 1/10 the number of nearest neighbours.
options
- the list of options as an array of strings
sigmaTipText
public java.lang.String sigmaTipText()
Returns the tip text for this property
setSigma
public void setSigma(int s) throws java.lang.Exception
Sets the sigma value.
s
- the value of sigma (> 0)
getSigma
public int getSigma()
Get the value of sigma.
numNeighboursTipText
public java.lang.String numNeighboursTipText()
Returns the tip text for this property
setNumNeighbours
public void setNumNeighbours(int n)
Set the number of nearest neighbours
n
- the number of nearest neighbours.
getNumNeighbours
public int getNumNeighbours()
Get the number of nearest neighbours
seedTipText
public java.lang.String seedTipText()
Returns the tip text for this property
setSeed
public void setSeed(int s)
Set the random number seed for randomly sampling instances.
s
- the random number seed.
getSeed
public int getSeed()
Get the seed used for randomly sampling instances.
sampleSizeTipText
public java.lang.String sampleSizeTipText()
Returns the tip text for this property
setSampleSize
public void setSampleSize(int s)
Set the number of instances to sample for attribute estimation
s
- the number of instances to sample.
getSampleSize
public int getSampleSize()
Get the number of instances used for estimating attributes
weightByDistanceTipText
public java.lang.String weightByDistanceTipText()
Returns the tip text for this property
setWeightByDistance
public void setWeightByDistance(boolean b)
Set the nearest neighbour weighting method
b
- true nearest neighbours are to be weighted by distance.
getWeightByDistance
public boolean getWeightByDistance()
Get whether nearest neighbours are being weighted by distance
getOptions
public java.lang.String[] getOptions()
Gets the current settings of ReliefFAttributeEval.
toString
public java.lang.String toString()
Return a description of the ReliefF attribute evaluator.
buildEvaluator
public void buildEvaluator(Instances data) throws java.lang.Exception
Initializes a ReliefF attribute evaluator.
data
- set of instances serving as training data
evaluateAttribute
public double evaluateAttribute(int attribute) throws java.lang.Exception
Evaluates an individual attribute using ReliefF's instance based approach.
The actual work is done by buildEvaluator which evaluates all features.
attribute
- the index of the attribute to be evaluated
main
public static void main(java.lang.String args[])
Main method for testing this class.
args
- the options
All Packages Class Hierarchy This Package Previous Next Index WEKA's home