Search Results for

    Show / Hide Table of Contents

    Class QuantileEstimator

    Subsamples data to provide accurate estimation of quantiles.

    Inheritance
    Object
    QuantileEstimator
    Implements
    CanGetProbLessThan<Double>
    CanGetQuantile<Double>
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Namespace: Microsoft.ML.Probabilistic.Distributions
    Assembly: Microsoft.ML.Probabilistic.dll
    Syntax
    [Serializable]
    [DataContract]
    public class QuantileEstimator : CanGetProbLessThan<double>, CanGetQuantile<double>

    Constructors

    QuantileEstimator(Double)

    Creates a new QuantileEstimator.

    Declaration
    public QuantileEstimator(double maximumError)
    Parameters
    Type Name Description
    Double maximumError

    The allowed error in the return value of GetProbLessThan. Must be greater than 0 and less than 1. As a rule of thumb, set this to the reciprocal of the number of desired quantiles.

    Fields

    MaximumError

    Declaration
    [DataMember]
    public readonly double MaximumError
    Field Value
    Type Description
    Double

    Methods

    Add(QuantileEstimator)

    Add all samples stored in another QuantileEstimator, compacting them as necessary.

    Declaration
    public void Add(QuantileEstimator that)
    Parameters
    Type Name Description
    QuantileEstimator that

    Add(Double)

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

    Add(Double, Int32)

    Declaration
    public void Add(double item, int weight)
    Parameters
    Type Name Description
    Double item
    Int32 weight

    AddRange(IEnumerable<Double>)

    Declaration
    public void AddRange(IEnumerable<double> items)
    Parameters
    Type Name Description
    IEnumerable<Double> items

    Deflate()

    Divide all sample weights by 2.

    Declaration
    public void Deflate()

    GetCount()

    Gets the total weight of retained items, which is an approximate count of the number of items added.

    Declaration
    public ulong GetCount()
    Returns
    Type Description
    UInt64

    GetProbBetween(Double, Double)

    Returns the probability mass in an interval.

    Declaration
    public double GetProbBetween(double lowerBound, double upperBound)
    Parameters
    Type Name Description
    Double lowerBound
    Double upperBound
    Returns
    Type Description
    Double

    A number between 0 and 1, inclusive.

    GetProbLessThan(Double)

    Returns the quantile rank of x. This is a probability such that GetQuantile(probability) == x, whenever x is inside the support of the distribution. May be discontinuous due to duplicates.

    Declaration
    public double GetProbLessThan(double x)
    Parameters
    Type Name Description
    Double x
    Returns
    Type Description
    Double

    GetQuantile(Double)

    Returns the largest value x such that GetProbLessThan(x) <= probability.

    Declaration
    public double GetQuantile(double probability)
    Parameters
    Type Name Description
    Double probability

    A real number in [0,1].

    Returns
    Type Description
    Double

    Inflate()

    Multiply all sample weights by 2.

    Declaration
    public void Inflate()

    SetRandomSeed(Int32)

    Sets the seed used for random number generation.

    Declaration
    public void SetRandomSeed(int seed)
    Parameters
    Type Name Description
    Int32 seed

    Specify the seed to use for random number generation.

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    Object.ToString()

    ValueEquals(QuantileEstimator)

    Returns true if that contains the same information as this.

    Declaration
    public bool ValueEquals(QuantileEstimator that)
    Parameters
    Type Name Description
    QuantileEstimator that
    Returns
    Type Description
    Boolean

    Implements

    CanGetProbLessThan<T>
    CanGetQuantile<T>
    In This Article
    Back to top Copyright © .NET Foundation. All rights reserved.