Class MixtureEstimator<TDist>
An estimator which is a mixture of distributions of the same type
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Distributions
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[DataContract]
public class MixtureEstimator<TDist> : Estimator<MixtureEstimator<TDist>>, Accumulator<TDist>
Type Parameters
Name | Description |
---|---|
TDist | The distribution type |
Constructors
MixtureEstimator()
Create a mixture model with no components
Declaration
public MixtureEstimator()
Fields
components
The components
Declaration
[DataMember]
protected List<TDist> components
Field Value
Type | Description |
---|---|
List<TDist> |
weights
The mixing weight of each component. Does not necessarily sum to 1.
Declaration
[DataMember]
protected List<double> weights
Field Value
Type | Description |
---|---|
List<Double> |
Properties
Components
The components of the mixture
Declaration
public IReadOnlyList<TDist> Components { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<TDist> |
Weights
The weights of the mixture
Declaration
public IReadOnlyList<double> Weights { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<Double> |
Methods
Add(TDist)
Add a component to the mixture. A weight of 1 is assumed
Declaration
public void Add(TDist item)
Parameters
Type | Name | Description |
---|---|---|
TDist | item | The component to add |
Add(TDist, Double)
Add a component to the mixture with a given weight
Declaration
public void Add(TDist item, double weight)
Parameters
Type | Name | Description |
---|---|---|
TDist | item | The component to add |
Double | weight | The weight |
GetDistribution(MixtureEstimator<TDist>)
The the resulting mixture
Declaration
public MixtureEstimator<TDist> GetDistribution(MixtureEstimator<TDist> result)
Parameters
Type | Name | Description |
---|---|---|
MixtureEstimator<TDist> | result | Where to put the resulting mixture |
Returns
Type | Description |
---|---|
MixtureEstimator<TDist> |
Normalize()
Normalize the weights to add to 1
Declaration
public void Normalize()
SetToZero()
Sets the mixture to zero, by removing all components.
Declaration
public void SetToZero()
WeightSum()
The sum of the component weights
Declaration
public double WeightSum()
Returns
Type | Description |
---|---|
Double |
Explicit Interface Implementations
Accumulator<TDist>.Clear()
Clears the estimator
Declaration
void Accumulator<TDist>.Clear()