Class BernoulliEstimator
Estimates a Bernoulli distribution from samples.
Implements
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Distributions
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
public class BernoulliEstimator : Estimator<Bernoulli>, Accumulator<Bernoulli>, Accumulator<bool>, SettableTo<BernoulliEstimator>, ICloneable
Fields
N
Number of samples
Declaration
public long N
Field Value
Type | Description |
---|---|
Int64 |
NProbTrue
Number of samples with value true
Declaration
public double NProbTrue
Field Value
Type | Description |
---|---|
Double |
Methods
Add(Bernoulli)
Adds a distribution item to the estimator
Declaration
public void Add(Bernoulli distribution)
Parameters
Type | Name | Description |
---|---|---|
Bernoulli | distribution | A Bernoulli distribution |
Add(Boolean)
Adds a sample to the estimator
Declaration
public void Add(bool sample)
Parameters
Type | Name | Description |
---|---|---|
Boolean | sample | The sample - true or false |
Clear()
Clears the estimator
Declaration
public void Clear()
Clone()
Returns a copy of the estimator.
Declaration
public object Clone()
Returns
Type | Description |
---|---|
Object |
GetDistribution(Bernoulli)
Gets the estimated distribution
Declaration
public Bernoulli GetDistribution(Bernoulli result)
Parameters
Type | Name | Description |
---|---|---|
Bernoulli | result | A place to put the resulting distribution. This is ignored because Bernoulli is a struct |
Returns
Type | Description |
---|---|
Bernoulli | The estimated distribution |
SetTo(BernoulliEstimator)
Sets this estimator's state from the supplied estimator.
Declaration
public void SetTo(BernoulliEstimator value)
Parameters
Type | Name | Description |
---|---|---|
BernoulliEstimator | value |