Search Results for

    Show / Hide Table of Contents

    Class GammaEstimator

    Estimates a Gamma distribution from samples.

    Inheritance
    Object
    GammaEstimator
    Implements
    Estimator<Gamma>
    Accumulator<Gamma>
    Accumulator<Double>
    SettableTo<GammaEstimator>
    ICloneable
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Microsoft.ML.Probabilistic.Distributions
    Assembly: Microsoft.ML.Probabilistic.dll
    Syntax
    public class GammaEstimator : Estimator<Gamma>, Accumulator<Gamma>, Accumulator<double>, SettableTo<GammaEstimator>, ICloneable
    Remarks
        The distribution is estimated via moment matching (not maximum-likelihood).
        In the one-dimensional case,
        E[x] = (a+1)/b
        var(x) = (a+1)/b^2
        b = E[x]/var(x)
        a = E[x]^2/var(x) - 1

    Fields

    mva

    Where to accumulate means and variances

    Declaration
    public MeanVarianceAccumulator mva
    Field Value
    Type Description
    MeanVarianceAccumulator

    Methods

    Add(Gamma)

    Adds a Gamma distribution item to the estimator

    Declaration
    public void Add(Gamma distribution)
    Parameters
    Type Name Description
    Gamma distribution

    The distribution instance to add

    Add(Gamma, Double)

    Adds a Gamma distribution item to the estimator

    Declaration
    public void Add(Gamma distribution, double weight)
    Parameters
    Type Name Description
    Gamma distribution

    The distribution instance to add

    Double weight

    The weight of the sample

    Add(Double)

    Adds a sample to the estimator

    Declaration
    public void Add(double value)
    Parameters
    Type Name Description
    Double value

    The sample to add

    Add(Double, Double)

    Adds a sample with a given weight to the estimator

    Declaration
    public void Add(double value, double weight)
    Parameters
    Type Name Description
    Double value

    The sample to add

    Double weight

    The weight of the sample

    Clear()

    Clears the estimator

    Declaration
    public void Clear()

    Clone()

    Returns a clone of this Gamma estimator.

    Declaration
    public object Clone()
    Returns
    Type Description
    Object

    GetDistribution(Gamma)

    Retrieves the estimated Gamma

    Declaration
    public Gamma GetDistribution(Gamma result)
    Parameters
    Type Name Description
    Gamma result

    Where to put the result

    Returns
    Type Description
    Gamma

    The resulting distribution

    SetTo(GammaEstimator)

    Sets the state of this estimator from the supplied estimator.

    Declaration
    public void SetTo(GammaEstimator value)
    Parameters
    Type Name Description
    GammaEstimator value

    Implements

    Estimator<T>
    Accumulator<T>
    Accumulator<T>
    SettableTo<T>
    System.ICloneable
    In This Article
    Back to top Copyright © .NET Foundation. All rights reserved.