Class MeanAccumulator
Class for accumulating weighted scalar observations and computing sample count and mean
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Math
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
public class MeanAccumulator : Accumulator<double>, SettableTo<MeanAccumulator>, ICloneable
Fields
Count
Sample count
Declaration
public double Count
Field Value
Type | Description |
---|---|
Double |
Mean
The sample mean
Declaration
public double Mean
Field Value
Type | Description |
---|---|
Double |
Methods
Add(MeanAccumulator)
Adds all observations added to another accumulator.
Declaration
public void Add(MeanAccumulator meanAccumulator)
Parameters
Type | Name | Description |
---|---|---|
MeanAccumulator | meanAccumulator |
Add(Double)
Adds an observation
Declaration
public void Add(double x)
Parameters
Type | Name | Description |
---|---|---|
Double | x |
Add(Double, Double)
Adds a weighted observation.
Declaration
public void Add(double x, double weight)
Parameters
Type | Name | Description |
---|---|---|
Double | x | |
Double | weight |
Clear()
Clears the accumulator
Declaration
public void Clear()
Clone()
Returns a clone of this estimator.
Declaration
public object Clone()
Returns
Type | Description |
---|---|
Object |
SetTo(MeanAccumulator)
Sets the state of this estimator from the specified estimator.
Declaration
public void SetTo(MeanAccumulator value)
Parameters
Type | Name | Description |
---|---|---|
MeanAccumulator | value |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |