Stats.RankCorrelation Method

Definition

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

Overload List

RankCorrelation(Vector<Double>, Vector<Double>) Gets the Spearman rank correlation coefficient between two sets of values.
RankCorrelation<T>(T[], T[]) Gets the Spearman rank correlation coefficient between two sets of values.

RankCorrelation<T>(T[], T[])

Gets the Spearman rank correlation coefficient between two sets of values.
C#
public static double RankCorrelation<T>(
	T[] values1,
	T[] values2
)

Parameters

values1  T[]
A Double array.
values2  T[]
A Double array.

Type Parameters

T

Return Value

Double
The correlation between the two sets of values.

Exceptions

ArgumentNullException

values1 is null.

-or-

values2 is null.

DimensionMismatchException

The length of values1 does not equal the length of values2.

RankCorrelation(Vector<Double>, Vector<Double>)

Gets the Spearman rank correlation coefficient between two sets of values.
C#
public static double RankCorrelation(
	this Vector<double> values1,
	Vector<double> values2
)

Parameters

values1  Vector<Double>
A Double array.
values2  Vector<Double>
A Double array.

Return Value

Double
The correlation between the two sets of values.

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

ArgumentNullException

values1 is null.

-or-

values2 is null.

DimensionMismatchException

The length of values1 does not equal the length of values2.

See Also