类 PrincipalComponents
java.lang.Object
weka.filters.Filter
weka.filters.unsupervised.attribute.PrincipalComponents
Performs a principal components analysis and transformation of the data.
Dimensionality reduction is accomplished by choosing enough eigenvectors to account for some percentage of the variance in the original data -- default 0.95 (95%).
Based on code of the attribute selection scheme 'PrincipalComponents' by Mark Hall and Gabi Schmidberger. Valid options are:
Dimensionality reduction is accomplished by choosing enough eigenvectors to account for some percentage of the variance in the original data -- default 0.95 (95%).
Based on code of the attribute selection scheme 'PrincipalComponents' by Mark Hall and Gabi Schmidberger. Valid options are:
-D Don't normalize input data.
-R <num> Retain enough PC attributes to account for this proportion of variance in the original data. (default: 0.95)
-A <num> Maximum number of attributes to include in transformed attribute names. (-1 = include all, default: 5)
-M <num> Maximum number of PC attributes to retain. (-1 = include all, default: -1)
- 版本:
- $Revision: 11449 $
- 作者:
- Mark Hall (mhall@cs.waikato.ac.nz) -- attribute selection code, Gabi Schmidberger (gabi@cs.waikato.ac.nz) -- attribute selection code, fracpete (fracpete at waikato dot ac dot nz) -- filter code
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明boolean
Signify that this batch of input to the filter is finished.Returns the tip text for this propertyReturns the capabilities of this evaluator.boolean
Get whether to center (rather than standardize) the data.int
Gets maximum number of attributes to include in transformed attribute names.int
Gets maximum number of PC attributes to retain.String[]
Gets the current settings of the filter.Returns the revision string.double
Gets the proportion of total variance to account for when retaining principal components.Returns a string describing this filter.boolean
Input an instance for filtering.Returns an enumeration describing the available options.static void
Main method for running this filter.Returns the tip text for this property.Returns the tip text for this property.void
setCenterData
(boolean center) Set whether to center (rather than standardize) the data.boolean
setInputFormat
(Instances instanceInfo) Sets the format of the input instances.void
setMaximumAttributeNames
(int value) Sets maximum number of attributes to include in transformed attribute names.void
setMaximumAttributes
(int value) Sets maximum number of PC attributes to retain.void
setOptions
(String[] options) Parses a list of options for this object.void
setVarianceCovered
(double value) Sets the amount of variance to account for when retaining principal components.Returns the tip text for this property.从类继承的方法 weka.filters.Filter
batchFilterFile, filterFile, getCapabilities, getOutputFormat, isFirstBatchDone, isNewBatch, isOutputFormatDefined, makeCopies, makeCopy, numPendingOutput, output, outputPeek, toString, useFilter, wekaStaticWrapper
-
构造器详细资料
-
PrincipalComponents
public PrincipalComponents()
-
-
方法详细资料
-
globalInfo
Returns a string describing this filter.- 返回:
- a description of the filter suitable for displaying in the explorer/experimenter gui
-
listOptions
Returns an enumeration describing the available options.- 指定者:
listOptions
在接口中OptionHandler
- 返回:
- an enumeration of all the available options.
-
setOptions
Parses a list of options for this object. Valid options are:-D Don't normalize input data.
-R <num> Retain enough PC attributes to account for this proportion of variance in the original data. (default: 0.95)
-A <num> Maximum number of attributes to include in transformed attribute names. (-1 = include all, default: 5)
-M <num> Maximum number of PC attributes to retain. (-1 = include all, default: -1)
- 指定者:
setOptions
在接口中OptionHandler
- 参数:
options
- the list of options as an array of strings- 抛出:
Exception
- if an option is not supported
-
getOptions
Gets the current settings of the filter.- 指定者:
getOptions
在接口中OptionHandler
- 返回:
- an array of strings suitable for passing to setOptions
-
centerDataTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setCenterData
public void setCenterData(boolean center) Set whether to center (rather than standardize) the data. If set to true then PCA is computed from the covariance rather than correlation matrix.- 参数:
center
- true if the data is to be centered rather than standardized
-
getCenterData
public boolean getCenterData()Get whether to center (rather than standardize) the data. If true then PCA is computed from the covariance rather than correlation matrix.- 返回:
- true if the data is to be centered rather than standardized.
-
varianceCoveredTipText
Returns the tip text for this property.- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setVarianceCovered
public void setVarianceCovered(double value) Sets the amount of variance to account for when retaining principal components.- 参数:
value
- 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.- 返回:
- the proportion of variance to account for
-
maximumAttributeNamesTipText
Returns the tip text for this property.- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setMaximumAttributeNames
public void setMaximumAttributeNames(int value) Sets maximum number of attributes to include in transformed attribute names.- 参数:
value
- the maximum number of attributes
-
getMaximumAttributeNames
public int getMaximumAttributeNames()Gets maximum number of attributes to include in transformed attribute names.- 返回:
- the maximum number of attributes
-
maximumAttributesTipText
Returns the tip text for this property.- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setMaximumAttributes
public void setMaximumAttributes(int value) Sets maximum number of PC attributes to retain.- 参数:
value
- the maximum number of attributes
-
getMaximumAttributes
public int getMaximumAttributes()Gets maximum number of PC attributes to retain.- 返回:
- the maximum number of attributes
-
getCapabilities
Returns the capabilities of this evaluator.- 指定者:
getCapabilities
在接口中CapabilitiesHandler
- 覆盖:
getCapabilities
在类中Filter
- 返回:
- the capabilities of this evaluator
- 另请参阅:
-
setInputFormat
Sets the format of the input instances.- 覆盖:
setInputFormat
在类中Filter
- 参数:
instanceInfo
- an Instances object containing the input instance structure (any instances contained in the object are ignored - only the structure is required).- 返回:
- true if the outputFormat may be collected immediately
- 抛出:
Exception
- if the input format can't be set successfully
-
input
Input an instance for filtering. Filter requires all training instances be read before producing output.- 覆盖:
input
在类中Filter
- 参数:
instance
- the input instance- 返回:
- true if the filtered instance may now be collected with output().
- 抛出:
IllegalStateException
- if no input format has been setException
- if conversion fails
-
batchFinished
Signify that this batch of input to the filter is finished.- 覆盖:
batchFinished
在类中Filter
- 返回:
- true if there are instances pending output
- 抛出:
NullPointerException
- if no input structure has been defined,Exception
- if there was a problem finishing the batch.
-
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 覆盖:
getRevision
在类中Filter
- 返回:
- the revision
-
main
Main method for running this filter.- 参数:
args
- should contain arguments to the filter: use -h for help
-