Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.math.linearalgebra.pca
Class PercentageEigenPairFilter

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
          extended by de.lmu.ifi.dbs.elki.math.linearalgebra.pca.PercentageEigenPairFilter
All Implemented Interfaces:
EigenPairFilter, Parameterizable

public class PercentageEigenPairFilter
extends AbstractParameterizable
implements EigenPairFilter

The PercentageEigenPairFilter sorts the eigenpairs in descending order of their eigenvalues and marks the first eigenpairs, whose sum of eigenvalues is higher than the given percentage of the sum of all eigenvalues as strong eigenpairs.

Author:
Elke Achtert

Field Summary
private  double alpha
          The threshold for strong eigenvectors: the strong eigenvectors explain a portion of at least alpha of the total variance.
private  DoubleParameter ALPHA_PARAM
          Parameter alpha.
static double DEFAULT_ALPHA
          The default value for alpha.
static OptionID EIGENPAIR_FILTER_ALPHA
          OptionID for ALPHA_PARAM
 
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
optionHandler
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug, logger
 
Constructor Summary
PercentageEigenPairFilter()
          Provides a new EigenPairFilter that sorts the eigenpairs in descending order of their eigenvalues and marks the first eigenpairs, whose sum of eigenvalues is higher than the given percentage of the sum of all eigenvalues as string eigenpairs.
 
Method Summary
 FilteredEigenPairs filter(SortedEigenPairs eigenPairs)
          Filters the specified eigenpairs into strong and weak eigenpairs, where strong eigenpairs having high variances and weak eigenpairs having small variances.
 List<String> setParameters(List<String> args)
          Grabs all specified options from the option handler.
 String shortDescription()
          Returns a short description of the class.
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
addOption, addParameterizable, addParameterizable, checkGlobalParameterConstraints, collectOptions, getAttributeSettings, getParameters, rememberParametersExcept, removeOption, removeParameterizable
 
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debugFine, debugFiner, debugFinest, exception, progress, verbose, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable
checkGlobalParameterConstraints, collectOptions, getParameters
 

Field Detail

EIGENPAIR_FILTER_ALPHA

public static final OptionID EIGENPAIR_FILTER_ALPHA
OptionID for ALPHA_PARAM


DEFAULT_ALPHA

public static final double DEFAULT_ALPHA
The default value for alpha.

See Also:
Constant Field Values

ALPHA_PARAM

private final DoubleParameter ALPHA_PARAM
Parameter alpha.


alpha

private double alpha
The threshold for strong eigenvectors: the strong eigenvectors explain a portion of at least alpha of the total variance.

Constructor Detail

PercentageEigenPairFilter

public PercentageEigenPairFilter()
Provides a new EigenPairFilter that sorts the eigenpairs in descending order of their eigenvalues and marks the first eigenpairs, whose sum of eigenvalues is higher than the given percentage of the sum of all eigenvalues as string eigenpairs.

Method Detail

filter

public FilteredEigenPairs filter(SortedEigenPairs eigenPairs)
Description copied from interface: EigenPairFilter
Filters the specified eigenpairs into strong and weak eigenpairs, where strong eigenpairs having high variances and weak eigenpairs having small variances.

Specified by:
filter in interface EigenPairFilter
Parameters:
eigenPairs - the eigenPairs (i.e. the eigenvectors and
Returns:
the filtered eigenpairs

shortDescription

public String shortDescription()
Description copied from class: AbstractParameterizable
Returns a short description of the class.

Specified by:
shortDescription in interface Parameterizable
Overrides:
shortDescription in class AbstractParameterizable
Returns:
Description of the class

setParameters

public List<String> setParameters(List<String> args)
                           throws ParameterException
Description copied from class: AbstractParameterizable
Grabs all specified options from the option handler. Any extending class should call this method first and return the returned array without further changes, but after setting further required parameters. An example for overwriting this method taking advantage from the previously (in superclasses) defined options would be:

 {
   List remainingParameters = super.setParameters(args);
   // set parameters for your class
   // for example like this:
   if(isSet(MY_PARAM_VALUE_PARAM))
   {
      myParamValue = getParameterValue(MY_PARAM_VALUE_PARAM);
   }
   .
   .
   .
   return remainingParameters;
   // or in case of attributes requesting parameters themselves
   // return parameterizableAttribbute.setParameters(remainingParameters);
 }
 

Specified by:
setParameters in interface Parameterizable
Overrides:
setParameters in class AbstractParameterizable
Parameters:
args - parameters to set the attributes accordingly to
Returns:
a list containing the unused parameters
Throws:
ParameterException - in case of wrong parameter-setting

Release 0.2.1 (2009-07-13_1605)