LabelledCategorical<'Label> Type
A wrapper around the Categorical distribution that associates each probability with a custom label of type 'Label.
Constructors
| Constructor | Description |
Full Usage:
LabelledCategorical(labels, probs)
Parameters:
'Label[]
-
An array of labels for each category (must be unique).
probs : float[]
-
An array of probabilities for each label (must sum to 1).
Returns: LabelledCategorical<'Label>
|
|
Instance members
| Instance member | Description |
Full Usage:
this.CDF
Parameters:
'Label
-
The label to evaluate the cumulative probability up to.
Returns: float
The cumulative probability.
|
|
Full Usage:
this.Labels
Returns: 'Label[]
|
|
Full Usage:
this.MeanLabel
Returns: 'Label
The label whose index is closest to the mean.
|
|
Full Usage:
this.PMF
Parameters:
'Label
-
The label to query.
Returns: float
The probability associated with the label, or 0.0 if the label is not found.
|
|
Full Usage:
this.Probabilities
Returns: float[]
|
|
Full Usage:
this.Sample
Returns: 'Label
A label corresponding to a sampled category.
|
|
Full Usage:
this.Support
Returns: 'Label[]
|
Static members
| Static member | Description |
Full Usage:
LabelledCategorical.Estimate(labels) (counts)
Parameters:
'Label[]
-
An array of labels.
counts : int[]
-
An array of counts corresponding to each label.
Returns: LabelledCategorical<'Label>
A new LabelledCategorical distribution.
|
|
Full Usage:
LabelledCategorical.Fit(observations)
Parameters:
'Label[]
-
An array of observed labels.
Returns: LabelledCategorical<'Label>
A new LabelledCategorical distribution with probabilities estimated from observed frequencies.
|
|
Full Usage:
LabelledCategorical.FromCdfUnnormalized(labels, cdf)
Parameters:
'Label[]
-
Labels corresponding to cumulative weights.
cdf : float[]
-
Unnormalized cumulative weights (must be increasing).
Returns: LabelledCategorical<'Label>
A normalized LabelledCategorical distribution.
|
|
FSharp.Stats