|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | 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 |
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 |
String |
globalInfo()
Returns a string describing this attribute transformer |
Enumeration |
listOptions()
Returns an enumeration describing the available options -N |
static void |
main(String[] argv)
Main method for testing this class |
String |
normalizeTipText()
Returns the tip text for this property |
void |
setNormalize(boolean n)
Set whether input data will be normalized. |
void |
setOptions(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 |
String |
toString()
Returns a description of this attribute transformer |
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. an empty set of instances. |
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 String globalInfo()
public Enumeration listOptions()
-N
listOptions
in interface OptionHandler
public void setOptions(String[] options) throws Exception
-N
setOptions
in interface OptionHandler
options
- the list of options as an array of strings
Exception
- if an option is not supported
public String normalizeTipText()
public void setNormalize(boolean n)
n
- true if input data is to be normalizedpublic boolean getNormalize()
public String varianceCoveredTipText()
public void setVarianceCovered(double vc)
vc
- the proportion of total variance to account forpublic double getVarianceCovered()
public String transformBackToOriginalTipText()
public void setTransformBackToOriginal(boolean b)
b
- true if the data should be transformed back to the
original spacepublic boolean getTransformBackToOriginal()
public String[] getOptions()
getOptions
in interface OptionHandler
public void buildEvaluator(Instances data) throws Exception
buildEvaluator
in class ASEvaluation
data
- the instances to analyse/transform
Exception
- if analysis failspublic Instances transformedHeader() throws Exception
transformedHeader
in interface AttributeTransformer
Exception
- if the header of the transformed data can't
be determined.public Instances transformedData() throws Exception
transformedData
in interface AttributeTransformer
Exception
- if transformed data can't be returnedpublic double evaluateAttribute(int att) throws Exception
evaluateAttribute
in class AttributeEvaluator
att
- the attribute to be evaluated
Exception
- if attribute can't be evaluatedpublic String toString()
toString
in class Object
public Instance convertInstance(Instance instance) throws Exception
convertInstance
in interface AttributeTransformer
instance
- an instance in the original (unormalized) format
Exception
- if instance cant be transformedpublic static void main(String[] argv)
argv
- should contain the command line arguments to the
evaluator/transformer (see AttributeSelection)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |