org.knime.base.node.mine.pca
Class EigenValue

java.lang.Object
  extended by org.knime.base.node.mine.pca.EigenValue
All Implemented Interfaces:
Comparable<EigenValue>

public class EigenValue
extends Object
implements Comparable<EigenValue>

This class describes an eigenvalue, eigenvector pair, comparable by absolute of eigenvalue.


Constructor Summary
EigenValue(int position, double value, Jama.Matrix vector)
          Create pair.
 
Method Summary
 int compareTo(EigenValue o)
          
static double[] extractEVVector(Jama.EigenvalueDecomposition eig)
          extract the vector of eigenvalues.
 int getPosition()
           
static Jama.Matrix getSortedEigenVectors(double[][] eigenVectors, double[] eigenvalues, int number)
          Constructs a matrix consisting of the first number eigenvectors of m, where first refers to the corresponding eigenvalues sorted by absolute value.
Take care that the matrix is symmetric!
 Double getValue()
           
 Jama.Matrix getVector()
           
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EigenValue

EigenValue(int position,
           double value,
           Jama.Matrix vector)
Create pair.

Parameters:
position - original position in eigenvalue matrix
value - eigenvalue
vector - eigenvector
Method Detail

getPosition

public int getPosition()
Returns:
original position in ev-matrix

compareTo

public int compareTo(EigenValue o)

Specified by:
compareTo in interface Comparable<EigenValue>

getValue

public Double getValue()
Returns:
the value

getVector

public Jama.Matrix getVector()
Returns:
the vector

toString

public String toString()

Overrides:
toString in class Object

extractEVVector

public static double[] extractEVVector(Jama.EigenvalueDecomposition eig)
extract the vector of eigenvalues.

Parameters:
eig - eigenvalue decomposition
Returns:
vector of eigenvalues

getSortedEigenVectors

public static Jama.Matrix getSortedEigenVectors(double[][] eigenVectors,
                                                double[] eigenvalues,
                                                int number)
Constructs a matrix consisting of the first number eigenvectors of m, where first refers to the corresponding eigenvalues sorted by absolute value.
Take care that the matrix is symmetric!

Parameters:
eigenVectors - list of eigenvectors
eigenvalues - list of eigenvalues
number - number of eigenvectors in return matrix
Returns:
matrix with eigenvectors columnwise


Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.