## Class CorrelationAnalysisSolution

• java.lang.Object
• elki.data.model.CorrelationAnalysisSolution
• All Implemented Interfaces:
Model, TextWriteable

public class CorrelationAnalysisSolution
extends java.lang.Object
implements TextWriteable, Model
A solution of correlation analysis is a matrix of equations describing the dependencies.
Since:
0.2
Author:
Arthur Zimek
• ### Field Summary

Fields
Modifier and Type Field Description
private double[] centroid
The centroid if the objects belonging to the hyperplane induced by the correlation.
private int correlationDimensionality
The dimensionality of the correlation.
private static double[] EMPTY_VECTOR
Empty constant vector returned when no subspace was used.
private LinearEquationSystem linearEquationSystem
Stores the solution equations.
private java.text.NumberFormat nf
Number format for output accuracy.
private double[][] similarityMatrix
The similarity matrix of the pca.
private double standardDeviation
The standard deviation within this solution.
private double[][] strongEigenvectors
The strong eigenvectors of the hyperplane induced by the correlation.
private double[][] weakEigenvectors
The weak eigenvectors of the hyperplane induced by the correlation.
• ### Fields inherited from interface elki.data.model.Model

TYPE
• ### Constructor Summary

Constructors
Constructor Description
CorrelationAnalysisSolution​(LinearEquationSystem solution, Relation<? extends NumberVector> db, double[][] strongEigenvectors, double[][] weakEigenvectors, double[][] similarityMatrix, double[] centroid)
Provides a new CorrelationAnalysisSolution holding the specified matrix.
CorrelationAnalysisSolution​(LinearEquationSystem solution, Relation<? extends NumberVector> db, double[][] strongEigenvectors, double[][] weakEigenvectors, double[][] similarityMatrix, double[] centroid, java.text.NumberFormat nf)
Provides a new CorrelationAnalysisSolution holding the specified matrix and number format.
• ### Method Summary

All Methods
Modifier and Type Method Description
double[] dataVector​(NumberVector p)
Returns the data vectors after projection.
double[] errorVector​(NumberVector p)
Returns the error vectors after projection.
double[] getCentroid()
Returns the centroid of this model.
int getCorrelationDimensionality()
Return the correlation dimensionality.
java.lang.String getLongName()
LinearEquationSystem getNormalizedLinearEquationSystem​(Normalization<?> normalization)
Returns the linear equation system for printing purposes.
double[][] getSimilarityMatrix()
Returns the similarity matrix of the pca.
double getStandardDeviation()
Returns the standard deviation of the distances of the objects belonging to the hyperplane underlying this solution.
double[][] getStrongEigenvectors()
Returns the strong eigenvectors.
double[][] getWeakEigenvectors()
Returns the weak eigenvectors.
double squaredDistance​(NumberVector p)
Returns the distance of NumberVector p from the hyperplane underlying this solution.
void writeToText​(TextWriterStream out, java.lang.String label)
Text output of the equation system
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Field Detail

• #### EMPTY_VECTOR

private static final double[] EMPTY_VECTOR
Empty constant vector returned when no subspace was used.
• #### linearEquationSystem

private LinearEquationSystem linearEquationSystem
Stores the solution equations.
• #### nf

private java.text.NumberFormat nf
Number format for output accuracy.
• #### correlationDimensionality

private int correlationDimensionality
The dimensionality of the correlation.
• #### standardDeviation

private final double standardDeviation
The standard deviation within this solution.
• #### weakEigenvectors

private final double[][] weakEigenvectors
The weak eigenvectors of the hyperplane induced by the correlation.
• #### strongEigenvectors

private final double[][] strongEigenvectors
The strong eigenvectors of the hyperplane induced by the correlation.
• #### similarityMatrix

private final double[][] similarityMatrix
The similarity matrix of the pca.
• #### centroid

private final double[] centroid
The centroid if the objects belonging to the hyperplane induced by the correlation.
• ### Constructor Detail

• #### CorrelationAnalysisSolution

public CorrelationAnalysisSolution​(LinearEquationSystem solution,
Relation<? extends NumberVector> db,
double[][] strongEigenvectors,
double[][] weakEigenvectors,
double[][] similarityMatrix,
double[] centroid)
Provides a new CorrelationAnalysisSolution holding the specified matrix.
Parameters:
solution - the linear equation system describing the solution equations
db - the database containing the objects
strongEigenvectors - the strong eigenvectors of the hyperplane induced by the correlation
weakEigenvectors - the weak eigenvectors of the hyperplane induced by the correlation
similarityMatrix - the similarity matrix of the underlying distance computations
centroid - the centroid if the objects belonging to the hyperplane induced by the correlation
• #### CorrelationAnalysisSolution

public CorrelationAnalysisSolution​(LinearEquationSystem solution,
Relation<? extends NumberVector> db,
double[][] strongEigenvectors,
double[][] weakEigenvectors,
double[][] similarityMatrix,
double[] centroid,
java.text.NumberFormat nf)
Provides a new CorrelationAnalysisSolution holding the specified matrix and number format.
Parameters:
solution - the linear equation system describing the solution equations
db - the database containing the objects
strongEigenvectors - the strong eigenvectors of the hyperplane induced by the correlation
weakEigenvectors - the weak eigenvectors of the hyperplane induced by the correlation
similarityMatrix - the similarity matrix of the underlying distance computations
centroid - the centroid if the objects belonging to the hyperplane induced by the correlation
nf - the number format for output accuracy
• ### Method Detail

• #### getNormalizedLinearEquationSystem

public LinearEquationSystem getNormalizedLinearEquationSystem​(Normalization<?> normalization)
throws NonNumericFeaturesException
Returns the linear equation system for printing purposes. If normalization is null the linear equation system is returned, otherwise the linear equation system will be transformed according to the normalization.
Parameters:
normalization - the normalization, can be null
Returns:
the linear equation system for printing purposes
Throws:
NonNumericFeaturesException - if the linear equation system is not compatible with values initialized during normalization
• #### getCorrelationDimensionality

public int getCorrelationDimensionality()
Return the correlation dimensionality.
Returns:
the correlation dimensionality
• #### squaredDistance

public double squaredDistance​(NumberVector p)
Returns the distance of NumberVector p from the hyperplane underlying this solution.
Parameters:
p - a vector in the space underlying this solution
Returns:
the distance of p from the hyperplane underlying this solution
• #### errorVector

public double[] errorVector​(NumberVector p)
Returns the error vectors after projection.
Parameters:
p - a vector in the space underlying this solution
Returns:
the error vectors
• #### dataVector

public double[] dataVector​(NumberVector p)
Returns the data vectors after projection.
Parameters:
p - a vector in the space underlying this solution
Returns:
the error vectors
• #### getStandardDeviation

public double getStandardDeviation()
Returns the standard deviation of the distances of the objects belonging to the hyperplane underlying this solution.
Returns:
the standard deviation of this solution
• #### getStrongEigenvectors

public double[][] getStrongEigenvectors()
Returns the strong eigenvectors.
Returns:
the strong eigenvectors
• #### getWeakEigenvectors

public double[][] getWeakEigenvectors()
Returns the weak eigenvectors.
Returns:
the weak eigenvectors
• #### getSimilarityMatrix

public double[][] getSimilarityMatrix()
Returns the similarity matrix of the pca.
Returns:
the similarity matrix of the pca
• #### getCentroid

public double[] getCentroid()
Returns the centroid of this model.
Returns:
the centroid of this model
• #### writeToText

public void writeToText​(TextWriterStream out,
java.lang.String label)
Text output of the equation system
Specified by:
writeToText in interface Model
Specified by:
writeToText in interface TextWriteable
Parameters:
out - Output writer
label - Label
• #### getLongName

public java.lang.String getLongName()