com.rapidminer.operator.features.transformation
Class PCAModel

java.lang.Object
  extended by com.rapidminer.operator.AbstractIOObject
      extended by com.rapidminer.operator.ResultObjectAdapter
          extended by com.rapidminer.operator.AbstractModel
              extended by com.rapidminer.operator.features.transformation.PCAModel
All Implemented Interfaces:
ComponentWeightsCreatable, IOObject, Model, ResultObject, Saveable, Readable, Reportable, LoggingHandler, java.io.Serializable

public class PCAModel
extends AbstractModel
implements ComponentWeightsCreatable

This is the transformation model of the principal components analysis. The number of components is initially specified by the PCA. Additionally you can specify the number of components in the ModelApplier. You can add two prediction parameter:

Author:
Daniel Hakenjos, Ingo Mierswa
See Also:
PCA, Serialized Form

Constructor Summary
PCAModel(ExampleSet eSet, double[] eigenvalues, double[][] eigenvectors)
           
 
Method Summary
 ExampleSet apply(ExampleSet exampleSet)
          Applies the model on the given example set.
 java.lang.String[] getAttributeNames()
           
 double getCumulativeVariance(int index)
           
 double getEigenvalue(int index)
           
 double[] getEigenvector(int index)
           
 int getMaximumNumberOfComponents()
           
 double getMean(int index)
           
 double[] getMeans()
           
 int getNumberOfComponents()
           
 double getVariance(int index)
           
 double getVarianceThreshold()
           
 java.awt.Component getVisualizationComponent(IOContainer container)
          Returns a editor pane that displays the ResultObjectAdapter.toResultString() result encoded as html.
 AttributeWeights getWeightsOfComponent(int component)
           
 void setNumberOfComponents(int numberOfComponents)
           
 void setParameter(java.lang.String name, java.lang.Object object)
          Throws a UserError since most models should not allow additional parameters during application.
 void setVarianceThreshold(double threshold)
           
 java.lang.String toString()
           
 
Methods inherited from class com.rapidminer.operator.AbstractModel
getExtension, getFileDescription, getName, getResultIcon, getTrainingHeader, isUpdatable, updateModel
 
Methods inherited from class com.rapidminer.operator.ResultObjectAdapter
addAction, getActions, isSavable, log, logError, logNote, logWarning, save, toHTML, toResultString
 
Methods inherited from class com.rapidminer.operator.AbstractIOObject
copy, getLog, getSource, initWriting, read, setLoggingHandler, setSource, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.rapidminer.operator.ResultObject
getActions, toResultString
 
Methods inherited from interface com.rapidminer.operator.IOObject
copy, getLog, getSource, setLoggingHandler, setSource, write
 
Methods inherited from interface com.rapidminer.operator.Saveable
isSavable, save
 

Constructor Detail

PCAModel

public PCAModel(ExampleSet eSet,
                double[] eigenvalues,
                double[][] eigenvectors)
Method Detail

getAttributeNames

public java.lang.String[] getAttributeNames()

getMeans

public double[] getMeans()

getMean

public double getMean(int index)

getVariance

public double getVariance(int index)

getCumulativeVariance

public double getCumulativeVariance(int index)

getEigenvalue

public double getEigenvalue(int index)

getEigenvector

public double[] getEigenvector(int index)

getVarianceThreshold

public double getVarianceThreshold()

getMaximumNumberOfComponents

public int getMaximumNumberOfComponents()

getNumberOfComponents

public int getNumberOfComponents()

setVarianceThreshold

public void setVarianceThreshold(double threshold)

setNumberOfComponents

public void setNumberOfComponents(int numberOfComponents)

apply

public ExampleSet apply(ExampleSet exampleSet)
                 throws OperatorException
Description copied from interface: Model
Applies the model on the given example set. Please note that the delivered example set might be the same as the input example set. This does, however, no always to be the case.

Specified by:
apply in interface Model
Throws:
OperatorException

setParameter

public void setParameter(java.lang.String name,
                         java.lang.Object object)
                  throws OperatorException
Description copied from class: AbstractModel
Throws a UserError since most models should not allow additional parameters during application. However, subclasses may overwrite this method.

Specified by:
setParameter in interface Model
Overrides:
setParameter in class AbstractModel
Throws:
OperatorException

getWeightsOfComponent

public AttributeWeights getWeightsOfComponent(int component)
                                       throws OperatorException
Specified by:
getWeightsOfComponent in interface ComponentWeightsCreatable
Throws:
OperatorException

getVisualizationComponent

public java.awt.Component getVisualizationComponent(IOContainer container)
Description copied from class: ResultObjectAdapter
Returns a editor pane that displays the ResultObjectAdapter.toResultString() result encoded as html. Please note that the returned pane is already enclosed by a scroll pane. If you overwrite this method you should again ensure that the returned component is scrollable. The given container is totally ignored.

Specified by:
getVisualizationComponent in interface ResultObject
Overrides:
getVisualizationComponent in class ResultObjectAdapter

toString

public java.lang.String toString()
Specified by:
toString in interface Readable
Overrides:
toString in class java.lang.Object


Copyright © 2001-2009 by Rapid-I