Click or drag to resize

NMathFunctionsCorrelation(DoubleVector, DoubleVector) Method

Computes the Pearson correlation of two data sets.

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
public static double Correlation(
	DoubleVector data1,
	DoubleVector data2
)

Parameters

data1  DoubleVector
The first data set.
data2  DoubleVector
The second set set.

Return Value

Double
Correlation.
Exceptions
ExceptionCondition
InvalidArgumentException Thrown if data has a length of zero or one.
MismatchedSizeException Thrown if data1 and data2 have different lengths.
See Also