Stats.Covariance Matrix Method
Definition
Namespace: Numerics.NET.Statistics
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Overload List
Covariance | Returns the covariance matrix for a list of numerical variables. |
Covariance | Returns the covariance matrix for an array of numerical variables. |
Covariance | Returns the covariance matrix for an array of numerical variables. |
Covariance | Returns the covariance matrix for the columns in a matrix. |
CovarianceMatrix(IList<Vector<Double>>)
Returns the covariance matrix for a list of numerical variables.
public static SymmetricMatrix<double> CovarianceMatrix(
this IList<Vector<double>> variables
)
Parameters
Return Value
SymmetricMatrix<Double>A symmetric matrix containing the covariance between the elements of variables.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IList<Vector<Double>>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Exceptions
Argument | variables is null. |
Argument | One or more of the elements of variables is null. -or- Not all elements of variables have the same length. |
CovarianceMatrix(ReadOnlySpan<Vector<Double>>)
Returns the covariance matrix for an array of numerical variables.
public static SymmetricMatrix<double> CovarianceMatrix(
ReadOnlySpan<Vector<double>> variables
)
Parameters
- variables ReadOnlySpan<Vector<Double>>
- An array of Vector<T>.
Return Value
SymmetricMatrix<Double>A symmetric matrix containing the covariance between the elements of variables.
Exceptions
Argument | variables is null. |
Argument | One or more of the elements of variables is null. -or- Not all elements of variables have the same length. |
CovarianceMatrix(Vector<Double>[])
Returns the covariance matrix for an array of numerical variables.
public static SymmetricMatrix<double> CovarianceMatrix(
this Vector<double>[] variables
)
Parameters
Return Value
SymmetricMatrix<Double>A symmetric matrix containing the covariance between the elements of variables.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<Double>[]. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Exceptions
Argument | variables is null. |
Argument | One or more of the elements of variables is null. -or- Not all elements of variables have the same length. |
CovarianceMatrix<T>(Matrix<T>, MultipleMissingValueAction)
Returns the covariance matrix for the columns in a matrix.
public static SymmetricMatrix<T> CovarianceMatrix<T>(
this Matrix<T> matrix,
MultipleMissingValueAction missingValueAction = MultipleMissingValueAction.Default
)
Parameters
- matrix Matrix<T>
- A matrix.
- missingValueAction MultipleMissingValueAction (Optional)
- The action to take when missing values are encountered. The default is list-wise deletion.
Type Parameters
- T
Return Value
SymmetricMatrix<T>A symmetric matrix containing the covariances between the columns of matrix.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Matrix<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Exceptions
Argument | matrix is null. |