Gets the Pearson correlation coefficient between two sets of values.
Namespace: Extreme.StatisticsAssembly: Extreme.Numerics.Net40 (in Extreme.Numerics.Net40.dll) Version: 6.0.16073.0 (6.0.16312.0)
public static double Correlation(
this Vector<double> data1,
Vector<double> data2
)
<ExtensionAttribute>
Public Shared Function Correlation (
data1 As Vector(Of Double),
data2 As Vector(Of Double)
) As Double
public:
[ExtensionAttribute]
static double Correlation(
Vector<double>^ data1,
Vector<double>^ data2
)
[<ExtensionAttribute>]
static member Correlation :
data1 : Vector<float> *
data2 : Vector<float> -> float
Parameters
- data1
- Type: Extreme.MathematicsVectorDouble
A Double array. - data2
- Type: Extreme.MathematicsVectorDouble
A Double array.
Return Value
Type:
DoubleThe 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
VectorDouble. 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).
Numerical Libraries
Supported in: 6.0
Reference