## Types in MathNet.Numerics.Statistics

Type Correlation

Namespace MathNet.Numerics.Statistics

A class with correlation measures between two datasets.

### Public Static Functions

#### Double[]Auto(Double[] x)

Auto-correlation function (ACF) based on FFT for all possible lags k.
##### Parameters
###### `Double[]` x

Data array to calculate auto correlation for.

##### Return
###### `Double[]`

An array with the ACF as a function of the lags k.

#### Double[]Auto(Double[] x, int kMax, int kMin)

Auto-correlation function (ACF) based on FFT for lags between kMin and kMax.
##### Parameters
###### `Double[]` x

The data array to calculate auto correlation for.

###### `int` kMax

Max lag to calculate ACF for must be positive and smaller than x.Length.

###### `int` kMin

Min lag to calculate ACF for (0 = no shift with acf=1) must be zero or positive and smaller than x.Length.

##### Return
###### `Double[]`

An array with the ACF as a function of the lags k.

#### Double[]Auto(Double[] x, Int32[] k)

Auto-correlation function based on FFT for lags k.
##### Parameters
###### `Double[]` x

The data array to calculate auto correlation for.

###### `Int32[]` k

Array with lags to calculate ACF for.

##### Return
###### `Double[]`

An array with the ACF as a function of the lags k.

#### doublePearson(IEnumerable<double> dataA, IEnumerable<double> dataB)

Computes the Pearson Product-Moment Correlation coefficient.

Sample data A.

Sample data B.

##### Return
###### `double`

The Pearson product-moment correlation coefficient.

#### 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.

#### doubleSpearman(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(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.

#### doubleWeightedPearson(IEnumerable<double> dataA, IEnumerable<double> dataB, IEnumerable<double> weights)

Computes the Weighted Pearson Product-Moment Correlation coefficient.
##### Parameters

Sample data A.

Sample data B.

###### `IEnumerable<double>` weights

Corresponding weights of data.

##### Return
###### `double`

The Weighted Pearson product-moment correlation coefficient.