Stats.CorrelationMatrix Method

Definition

Namespace: Numerics.NET.Statistics
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4

Overload List

CorrelationMatrix(IList<Vector<Double>>) Returns the correlation matrix for a list of numerical variables.
CorrelationMatrix(ReadOnlySpan<Vector<Double>>) Returns the correlation matrix for an array of numerical variables.
CorrelationMatrix(Vector<Double>[]) Returns the correlation matrix for an array of numerical variables.
CorrelationMatrix<T>(Matrix<T>) Returns the correlation matrix for the columns in a matrix.

CorrelationMatrix(IList<Vector<Double>>)

Returns the correlation matrix for a list of numerical variables.
C#
public static SymmetricMatrix<double> CorrelationMatrix(
	IList<Vector<double>> variables
)

Parameters

variables  IList<Vector<Double>>
A list of Vector<T>.

Return Value

SymmetricMatrix<Double>
A symmetric matrix containing the correlation between the elements of variables.

Exceptions

ArgumentNullException

variables is null.

CorrelationMatrix<T>(Matrix<T>)

Returns the correlation matrix for the columns in a matrix.
C#
public static SymmetricMatrix<T> CorrelationMatrix<T>(
	Matrix<T> matrix
)

Parameters

matrix  Matrix<T>
A matrix.

Type Parameters

T

Return Value

SymmetricMatrix<T>
A symmetric matrix containing the correlation between the columns of matrix.

Exceptions

ArgumentNullException

matrix is null.

CorrelationMatrix(ReadOnlySpan<Vector<Double>>)

Returns the correlation matrix for an array of numerical variables.
C#
public static SymmetricMatrix<double> CorrelationMatrix(
	ReadOnlySpan<Vector<double>> variables
)

Parameters

variables  ReadOnlySpan<Vector<Double>>
An array of Vector<T>.

Return Value

SymmetricMatrix<Double>
A symmetric matrix containing the correlation between the elements of variables.

Exceptions

ArgumentNullException

variables is null.

CorrelationMatrix(Vector<Double>[])

Returns the correlation matrix for an array of numerical variables.
C#
public static SymmetricMatrix<double> CorrelationMatrix(
	Vector<double>[] variables
)

Parameters

variables  Vector<Double>[]
An array of Vector<T>.

Return Value

SymmetricMatrix<Double>
A symmetric matrix containing the correlation between the elements of variables.

Exceptions

ArgumentNullException

variables is null.

See Also