Returns a new histogram of the counts for each value
in a vector.
Namespace:
Extreme.DataAnalysis
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public static Histogram<T> CreateHistogram<T>(
this CategoricalVector<T> samples,
Vector<double> weights
)
<ExtensionAttribute>
Public Shared Function CreateHistogram(Of T) (
samples As CategoricalVector(Of T),
weights As Vector(Of Double)
) As Histogram(Of T)
public:
[ExtensionAttribute]
generic<typename T>
static Histogram<T>^ CreateHistogram(
CategoricalVector<T>^ samples,
Vector<double>^ weights
)
[<ExtensionAttribute>]
static member CreateHistogram :
samples : CategoricalVector<'T> *
weights : Vector<float> -> Histogram<'T>
Parameters
- samples
- Type: Extreme.MathematicsCategoricalVectorT
A vector. - weights
- Type: Extreme.MathematicsVectorDouble
A vector that supplies weights for the values
in samples.
Type Parameters
- T
Return Value
Type:
HistogramTA vector that contains a histogram of the total weight of each unique value
in
samples, weighted by the
weights.
Return Value
Type:
HistogramTA vector that contains a histogram of the values
in
samples weighted by the
weights.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
CategoricalVectorT. 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).
Reference