Stats.Autocorrelation Method

Definition

Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

Autocorrelation(Double[]) Gets the lag-1 auto-correlation of the elements of an array.
Autocorrelation(Vector<Double>) Gets the lag-1 auto-correlation of the elements of a vector.
Autocorrelation(Double[], Int32) Gets the auto-correlation of the elements of an array.
Autocorrelation(Vector<Double>, Int32) Gets the auto-correlation of the elements of a vector.

Autocorrelation(Double[])

Gets the lag-1 auto-correlation of the elements of an array.
C#
public static double Autocorrelation(
	double[] values
)

Parameters

values  Double[]
A Double array.

Return Value

Double
The lag-1 auto-correlation of the elements of values.

Exceptions

ArgumentNullExceptionvalues is null.

Autocorrelation(Vector<Double>)

Gets the lag-1 auto-correlation of the elements of a vector.
C#
public static double Autocorrelation(
	this Vector<double> values
)

Parameters

values  Vector<Double>
A vector.

Return Value

Double
The lag-1 auto-correlation of the elements 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

ArgumentNullExceptionvalues is null.

Autocorrelation(Double[], Int32)

Gets the auto-correlation of the elements of an array.
C#
public static double Autocorrelation(
	double[] values,
	int lag
)

Parameters

values  Double[]
A Double array.
lag  Int32
The lag at which to evaluate the autocorrelation.

Return Value

Double
The auto-correlation of the elements of values with lag lag.

Exceptions

ArgumentNullExceptionvalues is null.
InsufficientDataExceptionlag is greater than or equal to the length of values.

Autocorrelation(Vector<Double>, Int32)

Gets the auto-correlation of the elements of a vector.
C#
public static double Autocorrelation(
	this Vector<double> values,
	int lag
)

Parameters

values  Vector<Double>
A vector.
lag  Int32
The lag at which to evaluate the autocorrelation.

Return Value

Double
The auto-correlation of the elements of values with lag lag.

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

ArgumentNullExceptionvalues is null.
InsufficientDataExceptionlag is greater than or equal to the length of values.

See Also