VectorExtensions.Quantiles<T> Method

Gets the specified quantile.

Definition

Namespace: Extreme.DataAnalysis
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
public static Vector<T> Quantiles<T>(
	this Vector<T> values,
	IList<double> probabilities,
	int type = 7,
	bool labels = false
)

Parameters

values  Vector<T>
A vector.
probabilities  IList<Double>
A vector of values between 0 and 1, inclusive that specify the quantiles to be computed.
type  Int32  (Optional)
The type of quantiles to compute.
labels  Boolean  (Optional)
If true, percentage labels are added to the result vector.

Type Parameters

T

Return Value

Vector<T>
A vector of the quantiles of values corresponding to the values in probabilities.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<T>. 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).

Remarks

If the quantile falls between two observations, it is interpolated between the adjacent observations.

Exceptions

ArgumentNullException

values is null.

-or-

probabilities is null.

ArgumentException One or more of the elements of probabilities is less than zero or greater than 1.
ArgumentOutOfRangeExceptiontype is less than 1 or greater than 9.

See Also