Class AlgorithmLDAPCA

java.lang.Object
  extended by Algorithm
      extended by AlgorithmLDAPCA
All Implemented Interfaces:
java.lang.Runnable

public class AlgorithmLDAPCA
extends Algorithm

Implements the combined LDA and PCA algorithm. The LDA is implemented first and then PCA is implemented.


Constructor Summary
AlgorithmLDAPCA()
           
 
Method Summary
 void betweenClass(Matrix M)
          Determines the between class scatter matrix for the class independent linear discrimination algorithm
 void computeDecisionRegions()
          Computes the line of discrimination for the classification algorithms when the corresponding flags have been initialized
 void computeErrors()
          Counts the data points in each set in error and displays them on the text message window
 void displayMatrices()
          Display two matrices - covariance matrix and the transformation matrix in the text message window
 boolean initialize()
          Overrides the initialize() method in the base class.
 void printMatrices()
          Displays the caovariance and LDA transform data matrix
 void run()
          Implementation of the run function from the Runnable interface.
 void transformLDA(DataPoints d, Matrix S)
          Transforms a given set of points to a new space using the class independent linear discrimination analysis algorithm
 void transformPCA()
          Transforms a given set of points to a new space using the class independent principal component analysis algorithm
 void withinClass(Matrix M)
          Determines the within class scatter matrix
 
Methods inherited from class Algorithm
computeMeans, disableControl, enableControl, nextStep, prevStep, scaleToFitData, setDataPoints, setOutputPanel, setProcessBox
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlgorithmLDAPCA

public AlgorithmLDAPCA()
Method Detail

initialize

public boolean initialize()
Overrides the initialize() method in the base class. Initializes member data and prepares for execution of first step. This method "resets" the algorithm.

Specified by:
initialize in class Algorithm
Returns:
Returns true

run

public void run()
Implementation of the run function from the Runnable interface. Determines what the current step is and calls the appropriate method.

Specified by:
run in interface java.lang.Runnable
Specified by:
run in class Algorithm

withinClass

public void withinClass(Matrix M)
Determines the within class scatter matrix

Parameters:
M - Matrix for within class scatter matrix
See Also:
Matrix

betweenClass

public void betweenClass(Matrix M)
Determines the between class scatter matrix for the class independent linear discrimination algorithm

Parameters:
M - Matrix for storing between class scatter matrix
See Also:
Matrix

displayMatrices

public void displayMatrices()
Display two matrices - covariance matrix and the transformation matrix in the text message window


printMatrices

public void printMatrices()
Displays the caovariance and LDA transform data matrix


transformPCA

public void transformPCA()
Transforms a given set of points to a new space using the class independent principal component analysis algorithm


transformLDA

public void transformLDA(DataPoints d,
                         Matrix S)
Transforms a given set of points to a new space using the class independent linear discrimination analysis algorithm

Parameters:
d - DataPoints to be transformed
S - transformed matrix

computeDecisionRegions

public void computeDecisionRegions()
Computes the line of discrimination for the classification algorithms when the corresponding flags have been initialized


computeErrors

public void computeErrors()
Counts the data points in each set in error and displays them on the text message window