Creates a square, symmetric matrix containing the variances and
covariances of the columns in data. Intermediate calculations are memoized.
Namespace:
CenterSpace.NMath.StatsAssembly: NMathStats (in NMathStats.dll) Version: 3.4.0.0
Syntax
| C# |
|---|
public static DoubleMatrix CovarianceMatrixMemoized( DoubleMatrix data, BiasType type ) |
| Visual Basic (Declaration) |
|---|
Public Shared Function CovarianceMatrixMemoized ( _ data As DoubleMatrix, _ type As BiasType _ ) As DoubleMatrix |
| Visual C++ |
|---|
public: static DoubleMatrix^ CovarianceMatrixMemoized( DoubleMatrix^ data, BiasType type ) |
Parameters
- data
- Type: CenterSpace.NMath.Core..::.DoubleMatrix
Matrix.
- type
- Type: CenterSpace.NMath.Stats..::.BiasType
Biased or unbiased.
Return Value
The covariance matrix.
Remarks
If C is the returned covariance matrix, then the diagonal elements
C[i,i] represent the variances for the columns of data. The
off-diagonal elements C[i,j] represent the covariances of columns
i and j.
Exceptions
| Exception | Condition |
|---|---|
| CenterSpace.NMath.Core..::.InvalidArgumentException | Thrown if data has only one row. |