Namespaces

Types in MathNet.Numerics.Statistics

Type Correlation

Namespace MathNet.Numerics.Statistics

A class with correlation measures between two datasets.

Static Functions

Public Static Functions

double Pearson(IEnumerable<double> dataA, IEnumerable<double> dataB)

Computes the Pearson Product-Moment Correlation coefficient.
Parameters
IEnumerable<double> dataA

Sample data A.

IEnumerable<double> dataB

Sample data B.

Return
double

The Pearson product-moment correlation coefficient.

Matrix<T> PearsonMatrix(Double[][] vectors)

Matrix<T> PearsonMatrix(IEnumerable<Double[]> vectors)

Computes the Pearson Product-Moment Correlation matrix.
Parameters
IEnumerable<Double[]> vectors

Enumerable of sample data vectors.

Return
Matrix<T>

The Pearson product-moment correlation matrix.

double Spearman(IEnumerable<double> dataA, IEnumerable<double> dataB)

Computes the Spearman Ranked Correlation coefficient.
Parameters
IEnumerable<double> dataA

Sample data series A.

IEnumerable<double> dataB

Sample data series B.

Return
double

The Spearman ranked correlation coefficient.

Matrix<T> SpearmanMatrix(Double[][] vectors)

Matrix<T> SpearmanMatrix(IEnumerable<Double[]> vectors)

Computes the Spearman Ranked Correlation matrix.
Parameters
IEnumerable<Double[]> vectors

Enumerable of sample data vectors.

Return
Matrix<T>

The Spearman ranked correlation matrix.

double WeightedPearson(IEnumerable<double> dataA, IEnumerable<double> dataB, IEnumerable<double> weights)

Computes the Weighted Pearson Product-Moment Correlation coefficient.
Parameters
IEnumerable<double> dataA

Sample data A.

IEnumerable<double> dataB

Sample data B.

IEnumerable<double> weights

Corresponding weights of data.

Return
double

The Weighted Pearson product-moment correlation coefficient.