Histogram.Create Histogram<T>(Categorical Vector<T>, Vector<Double>) Method
Returns a new histogram of the counts for each value
in a vector.
Definition
Namespace: Extreme.DataAnalysis
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
A vector that contains a histogram of the total weight of each unique value in samples, weighted by the weights.
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
public static Histogram<T> CreateHistogram<T>(
this CategoricalVector<T> samples,
Vector<double> weights
)
Parameters
- samples CategoricalVector<T>
- A vector.
- weights Vector<Double>
- A vector that supplies weights for the values in samples.
Type Parameters
- T
Return Value
Histogram<T>A vector that contains a histogram of the total weight of each unique value 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 CategoricalVector<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).Exceptions
Argument | samples is null. -or- weights is null. |
Dimension | samples and weights do not have the same length. |