Stats.Autocorrelation Method

Definition

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

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

ArgumentNullException

values 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

ArgumentNullException

values 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

ArgumentNullException

values is null.

InsufficientDataException

lag 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

ArgumentNullException

values is null.

InsufficientDataException

lag is greater than or equal to the length of values.

See Also