Vector.Bin<T>(IVector, IList<T>, Special Bins) Method
Sorts values into bins and returns the result as a categorical vector.
Definition
Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
A categorical vector containing the bin assignments.
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
public static CategoricalVector<Interval<T>> Bin<T>(
this IVector values,
IList<T> bounds,
SpecialBins specialBins = SpecialBins.None
)
where T : Object, IComparable<T>
Parameters
- values IVector
- A vector.
- bounds IList<T>
- The number of intervals.
- specialBins SpecialBins (Optional)
- (Optional.) A SpecialBins value that specifies which special bins, if any, to include. The default is None.
Type Parameters
- T
- The type of the values to sort.
Return Value
CategoricalVector<Interval<T>>A categorical vector containing the bin assignments.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IVector. 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
The bins are evenly spaced between the smallest and the largest value in values.