Class SampleCovariance
- java.lang.Object
-
- dev.nm.algebra.linear.matrix.doubles.matrixtype.dense.DenseMatrix
-
- dev.nm.stat.descriptive.covariance.SampleCovariance
-
- All Implemented Interfaces:
Matrix,MatrixAccess,MatrixRing,MatrixTable,Densifiable,AbelianGroup<Matrix>,Monoid<Matrix>,Ring<Matrix>,Table,DeepCopyable
public class SampleCovariance 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 of the matrix. The R equivalent function iscov.
-
-
Constructor Summary
Constructors Constructor Description SampleCovariance(Matrix A)Construct the covariance matrix of a matrix.SampleCovariance(Matrix A, boolean unbiased)Construct the covariance matrix of a matrix.
-
Method Summary
-
Methods inherited from class dev.nm.algebra.linear.matrix.doubles.matrixtype.dense.DenseMatrix
add, deepCopy, equals, get, getColumn, getColumn, getRow, getRow, hashCode, minus, multiply, multiply, nCols, nRows, ONE, opposite, scaled, set, setColumn, setRow, t, toDense, toString, ZERO
-
-
-
-
Constructor Detail
-
SampleCovariance
public SampleCovariance(Matrix A)
Construct the covariance matrix of a matrix. By default, the sample covariance matrix is unbiased.- Parameters:
A- a matrix
-
SampleCovariance
public SampleCovariance(Matrix A, boolean unbiased)
Construct the covariance matrix of a matrix.- Parameters:
A- a matrixunbiased-trueif the estimate is unbiased
-
-