com.numericalmethod.suanshu.stats.descriptive
Class CovarianceMatrix
java.lang.Object
com.numericalmethod.suanshu.matrix.doubles.matrixtype.MatrixMathImpl<T>
com.numericalmethod.suanshu.matrix.doubles.matrixtype.MatrixStorageImpl<DenseMatrix>
com.numericalmethod.suanshu.matrix.doubles.matrixtype.dense.DenseMatrix
com.numericalmethod.suanshu.stats.descriptive.CovarianceMatrix
- All Implemented Interfaces:
- DeepCopyable, AbelianGroup<Matrix>, Monoid<Matrix>, Ring<Matrix>, Matrix, MatrixAccessor, MatrixRing, Densifiable, MatrixDimension
public class CovarianceMatrix
- extends DenseMatrix
This class computes the Covariance matrix of a matrix,
where the (i, j) entry is the covariance of the i-th column and j-th column.
The R equivalent function is cov.
| Methods inherited from class com.numericalmethod.suanshu.matrix.doubles.matrixtype.dense.DenseMatrix |
add, deepCopy, getColumn, getColumn, getMatrixData, getRow, getRow, getSample, minus, multiply, multiply, ONE, overwrite, scaled, t, toDense, ZERO |
| Methods inherited from class com.numericalmethod.suanshu.matrix.doubles.matrixtype.MatrixMathImpl |
add, call, minus, multiply, nCols, nRows, opposite, setColumn, setColumn, setRow, setRow, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
CovarianceMatrix
public CovarianceMatrix(Matrix A)
- Construct the covariance matrix for a matrix.
- Parameters:
A - a matrix
correlationMatrix
public ImmutableMatrix correlationMatrix()
- Get a copy of the correlation matrix.
- Returns:
- the correlation matrix
Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.