|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weka.attributeSelection.ASEvaluation | +--weka.attributeSelection.AttributeEvaluator | +--weka.attributeSelection.PrincipalComponents
Class for performing principal components analysis/transformation.
Constructor Summary | |
PrincipalComponents()
|
Method Summary | |
void |
buildEvaluator(Instances data)
Initializes principal components and performs the analysis |
Instance |
convertInstance(Instance instance)
Transform an instance in original (unormalized) format. |
double |
evaluateAttribute(int att)
Evaluates the merit of a transformed attribute. |
boolean |
getNormalize()
Gets whether or not input data is to be normalized |
java.lang.String[] |
getOptions()
Gets the current settings of PrincipalComponents |
boolean |
getTransformBackToOriginal()
Gets whether the data is to be transformed back to the original space. |
double |
getVarianceCovered()
Gets the proportion of total variance to account for when retaining principal components |
java.lang.String |
globalInfo()
Returns a string describing this attribute transformer |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options |
static void |
main(java.lang.String[] argv)
Main method for testing this class |
java.lang.String |
normalizeTipText()
Returns the tip text for this property |
void |
setNormalize(boolean n)
Set whether input data will be normalized. |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
void |
setTransformBackToOriginal(boolean b)
Sets whether the data should be transformed back to the original space |
void |
setVarianceCovered(double vc)
Sets the amount of variance to account for when retaining principal components |
java.lang.String |
toString()
Returns a description of this attribute transformer |
java.lang.String |
transformBackToOriginalTipText()
Returns the tip text for this property |
Instances |
transformedData()
Gets the transformed training data. |
Instances |
transformedHeader()
Returns just the header for the transformed data (ie. |
java.lang.String |
varianceCoveredTipText()
Returns the tip text for this property |
Methods inherited from class weka.attributeSelection.ASEvaluation |
forName, makeCopies, postProcess |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PrincipalComponents()
Method Detail |
public java.lang.String globalInfo()
public java.util.Enumeration listOptions()
-N
listOptions
in interface OptionHandler
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-N
setOptions
in interface OptionHandler
options
- the list of options as an array of stringsjava.lang.Exception
- if an option is not supported
public java.lang.String normalizeTipText()
public void setNormalize(boolean n)
n
- true if input data is to be normalizedpublic boolean getNormalize()
public java.lang.String varianceCoveredTipText()
public void setVarianceCovered(double vc)
vc
- the proportion of total variance to account forpublic double getVarianceCovered()
public java.lang.String transformBackToOriginalTipText()
public void setTransformBackToOriginal(boolean b)
b
- true if the data should be transformed back to the
original spacepublic boolean getTransformBackToOriginal()
public java.lang.String[] getOptions()
getOptions
in interface OptionHandler
public void buildEvaluator(Instances data) throws java.lang.Exception
buildEvaluator
in class ASEvaluation
data
- the instances to analyse/transformjava.lang.Exception
- if analysis failspublic Instances transformedHeader() throws java.lang.Exception
transformedHeader
in interface AttributeTransformer
java.lang.Exception
- if the header of the transformed data can't
be determined.public Instances transformedData() throws java.lang.Exception
transformedData
in interface AttributeTransformer
java.lang.Exception
- if transformed data can't be returnedpublic double evaluateAttribute(int att) throws java.lang.Exception
evaluateAttribute
in class AttributeEvaluator
att
- the attribute to be evaluatedjava.lang.Exception
- if attribute can't be evaluatedpublic java.lang.String toString()
toString
in class java.lang.Object
public Instance convertInstance(Instance instance) throws java.lang.Exception
convertInstance
in interface AttributeTransformer
instance
- an instance in the original (unormalized) formatjava.lang.Exception
- if instance cant be transformedpublic static void main(java.lang.String[] argv)
argv
- should contain the command line arguments to the
evaluator/transformer (see AttributeSelection)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |