All Packages Class Hierarchy This Package Previous Next Index WEKA's home
java.lang.Object
|
+----weka.attributeSelection.ASEvaluation
|
+----weka.attributeSelection.AttributeEvaluator
|
+----weka.attributeSelection.UnsupervisedAttributeEvaluator
|
+----weka.attributeSelection.PrincipalComponents
Valid options are:
-N
Don't normalize the input data.
-R
-T
-N
-R
-T
Retain enough pcs to account for this proportion of the variance.
Transform through the PC space and back to the original space.
buildEvaluator(Instances)
convertInstance(Instance)
evaluateAttribute(int)
getNormalize()
getOptions()
getTransformBackToOriginal()
getVarianceCovered()
globalInfo()
listOptions()
main(String[])
normalizeTipText()
setNormalize(boolean)
setOptions(String[])
setTransformBackToOriginal(boolean)
setVarianceCovered(double)
toString()
transformBackToOriginalTipText()
transformedData()
transformedHeader()
varianceCoveredTipText()
PrincipalComponents
public PrincipalComponents()
globalInfo
public java.lang.String globalInfo()
Returns a string describing this attribute transformer
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:
Don't normalize the input data.
Retain enough pcs to account for this proportion of the variance.
Transform through the PC space and back to the original space.
options - the list of options as an array of strings
normalizeTipText
public java.lang.String normalizeTipText()
Returns the tip text for this property
setNormalize
public void setNormalize(boolean n)
Set whether input data will be normalized.
n - true if input data is to be normalized
getNormalize
public boolean getNormalize()
Gets whether or not input data is to be normalized
varianceCoveredTipText
public java.lang.String varianceCoveredTipText()
Returns the tip text for this property
setVarianceCovered
public void setVarianceCovered(double vc)
Sets the amount of variance to account for when retaining
principal components
vc - the proportion of total variance to account for
getVarianceCovered
public double getVarianceCovered()
Gets the proportion of total variance to account for when
retaining principal components
transformBackToOriginalTipText
public java.lang.String transformBackToOriginalTipText()
Returns the tip text for this property
setTransformBackToOriginal
public void setTransformBackToOriginal(boolean b)
Sets whether the data should be transformed back to the original
space
b - true if the data should be transformed back to the
original space
getTransformBackToOriginal
public boolean getTransformBackToOriginal()
Gets whether the data is to be transformed back to the original
space.
getOptions
public java.lang.String[] getOptions()
Gets the current settings of PrincipalComponents
buildEvaluator
public void buildEvaluator(Instances data) throws java.lang.Exception
Initializes principal components and performs the analysis
data - the instances to analyse/transform
transformedHeader
public Instances transformedHeader() throws java.lang.Exception
Returns just the header for the transformed data (ie. an empty
set of instances. This is so that AttributeSelection can
determine the structure of the transformed data without actually
having to get all the transformed data through getTransformedData().
transformedData
public Instances transformedData() throws java.lang.Exception
Gets the transformed training data.
evaluateAttribute
public double evaluateAttribute(int att) throws java.lang.Exception
Evaluates the merit of a transformed attribute. This is defined
to be 1 minus the cumulative variance explained. Merit can't
be meaningfully evaluated if the data is to be transformed back
to the original space.
att - the attribute to be evaluated
toString
public java.lang.String toString()
Returns a description of this attribute transformer
convertInstance
public Instance convertInstance(Instance instance) throws java.lang.Exception
Transform an instance in original (unormalized) format. Convert back
to the original space if requested.
instance - an instance in the original (unormalized) format
main
public static void main(java.lang.String argv[])
Main method for testing this class
argv - should contain the command line arguments to the
evaluator/transformer (see AttributeSelection)
All Packages Class Hierarchy This Package Previous Next Index WEKA's home