Sorts values into bins and returns the result as a categorical vector.
Namespace:
Extreme.Mathematics
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public static CategoricalVector<Interval<T>> Bin<T>(
this IVector values,
IList<T> bounds,
SpecialBins specialBins = SpecialBins.None
)
where T : Object, IComparable<T>
<ExtensionAttribute>
Public Shared Function Bin(Of T As {Object, IComparable(Of T)}) (
values As IVector,
bounds As IList(Of T),
Optional specialBins As SpecialBins = SpecialBins.None
) As CategoricalVector(Of Interval(Of T))
public:
[ExtensionAttribute]
generic<typename T>
where T : Object, IComparable<T>
static CategoricalVector<Interval<T>>^ Bin(
IVector^ values,
IList<T>^ bounds,
SpecialBins specialBins = SpecialBins::None
)
[<ExtensionAttribute>]
static member Bin :
values : IVector *
bounds : IList<'T> *
?specialBins : SpecialBins
(* Defaults:
let _specialBins = defaultArg specialBins SpecialBins.None
*)
-> CategoricalVector<Interval<'T>> when 'T : Object and IComparable<'T>
Parameters
- values
- Type: Extreme.MathematicsIVector
A vector. - bounds
- Type: System.Collections.GenericIListT
The number of intervals. - specialBins (Optional)
- Type: Extreme.DataAnalysisSpecialBins
(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
Type:
CategoricalVectorIntervalTA 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).
The bins are evenly spaced between the smallest and the largest value in
values.
Reference