Search Results for

    Show / Hide Table of Contents

    Class SparseBernoulliList

    Represents a sparse list of Bernoulli distributions, optimized for the case where many share the same parameter value. The class supports an approximation tolerance which allows elements close to the common value to be automatically reset to the common value.

    Inheritance
    Object
    SparseList<Bernoulli>
    ApproximateSparseList<Bernoulli>
    SparseDistributionList<Bernoulli, Boolean, SparseBernoulliList>
    SparseBernoulliList
    Implements
    ISparseList<Bernoulli>
    ISparseEnumerable<Bernoulli>
    IList<Bernoulli>
    ICollection<Bernoulli>
    IEnumerable<Bernoulli>
    IList
    ICollection
    IEnumerable
    IDistribution<ISparseList<Boolean>>
    IDistribution
    ICloneable
    Diffable
    SettableToUniform
    HasPoint<ISparseList<Boolean>>
    CanGetLogProb<ISparseList<Boolean>>
    Sampleable<ISparseList<Boolean>>
    SettableTo<SparseBernoulliList>
    SettableToProduct<SparseBernoulliList>
    SettableToProduct<SparseBernoulliList, SparseBernoulliList>
    SettableToPower<SparseBernoulliList>
    SettableToRatio<SparseBernoulliList>
    SettableToRatio<SparseBernoulliList, SparseBernoulliList>
    SettableToWeightedSum<SparseBernoulliList>
    CanGetLogAverageOf<SparseBernoulliList>
    CanGetLogAverageOfPower<SparseBernoulliList>
    CanGetAverageLog<SparseBernoulliList>
    CanGetMean<ISparseList<Double>>
    CanGetVariance<ISparseList<Double>>
    Inherited Members
    SparseDistributionList<Bernoulli, Boolean, SparseBernoulliList>.Dimension
    SparseDistributionList<Bernoulli, Boolean, SparseBernoulliList>.Point
    SparseDistributionList<Bernoulli, Boolean, SparseBernoulliList>.IsPointMass
    SparseDistributionList<Bernoulli, Boolean, SparseBernoulliList>.FromSize(Int32, Double)
    SparseDistributionList<Bernoulli, Boolean, SparseBernoulliList>.Constant(Int32, Bernoulli, Double)
    SparseDistributionList<Bernoulli, Boolean, SparseBernoulliList>.FromSparseValues(Int32, Bernoulli, List<ValueAtIndex<Bernoulli>>, Double)
    SparseDistributionList<Bernoulli, Boolean, SparseBernoulliList>.FromSparseList(ISparseList<Bernoulli>, Double)
    SparseDistributionList<Bernoulli, Boolean, SparseBernoulliList>.FromSize(Int32)
    SparseDistributionList<Bernoulli, Boolean, SparseBernoulliList>.Constant(Int32, Bernoulli)
    SparseDistributionList<Bernoulli, Boolean, SparseBernoulliList>.FromSparseValues(Int32, Bernoulli, List<ValueAtIndex<Bernoulli>>)
    SparseDistributionList<Bernoulli, Boolean, SparseBernoulliList>.FromSparseList(ISparseList<Bernoulli>)
    SparseDistributionList<Bernoulli, Boolean, SparseBernoulliList>.Clone()
    SparseDistributionList<Bernoulli, Boolean, SparseBernoulliList>.MaxDiff(Object)
    SparseDistributionList<Bernoulli, Boolean, SparseBernoulliList>.SetToUniform()
    SparseDistributionList<Bernoulli, Boolean, SparseBernoulliList>.IsUniform()
    SparseDistributionList<Bernoulli, Boolean, SparseBernoulliList>.GetLogProb(ISparseList<Boolean>)
    SparseDistributionList<Bernoulli, Boolean, SparseBernoulliList>.Sample()
    SparseDistributionList<Bernoulli, Boolean, SparseBernoulliList>.Sample(ISparseList<Boolean>)
    SparseDistributionList<Bernoulli, Boolean, SparseBernoulliList>.SetTo(SparseBernoulliList)
    SparseDistributionList<Bernoulli, Boolean, SparseBernoulliList>.SetToProduct(SparseBernoulliList, SparseBernoulliList)
    SparseDistributionList<Bernoulli, Boolean, SparseBernoulliList>.SetToPower(SparseBernoulliList, Double)
    SparseDistributionList<Bernoulli, Boolean, SparseBernoulliList>.SetToRatio(SparseBernoulliList, SparseBernoulliList, Boolean)
    SparseDistributionList<Bernoulli, Boolean, SparseBernoulliList>.SetToSum(Double, SparseBernoulliList, Double, SparseBernoulliList)
    SparseDistributionList<Bernoulli, Boolean, SparseBernoulliList>.GetLogAverageOf(SparseBernoulliList)
    SparseDistributionList<Bernoulli, Boolean, SparseBernoulliList>.GetLogAverageOfPower(SparseBernoulliList, Double)
    SparseDistributionList<Bernoulli, Boolean, SparseBernoulliList>.GetAverageLog(SparseBernoulliList)
    SparseDistributionList<Bernoulli, Boolean, SparseBernoulliList>.GetMean()
    SparseDistributionList<Bernoulli, Boolean, SparseBernoulliList>.GetVariance()
    ApproximateSparseList<Bernoulli>.DefaultTolerance
    ApproximateSparseList<Bernoulli>.Tolerance
    ApproximateSparseList<Bernoulli>.FromSize(Int32, Double)
    ApproximateSparseList<Bernoulli>.Constant(Int32, Bernoulli, Double)
    ApproximateSparseList<Bernoulli>.FromSparseValues(Int32, Bernoulli, List<ValueAtIndex<Bernoulli>>, Double)
    ApproximateSparseList<Bernoulli>.Item[Int32]
    ApproximateSparseList<Bernoulli>.SetTo(ApproximateSparseList<Bernoulli>)
    ApproximateSparseList<Bernoulli>.SetTo(IList<Bernoulli>, Bernoulli)
    ApproximateSparseList<Bernoulli>.Clone()
    ApproximateSparseList<Bernoulli>.Equals(Object)
    ApproximateSparseList<Bernoulli>.GetHashCode()
    ApproximateSparseList<Bernoulli>.SetToFunction<T2>(SparseList<T2>, Func<T2, Bernoulli>)
    ApproximateSparseList<Bernoulli>.SetToFunction<T2>(ISparseEnumerable<T2>, Func<T2, Bernoulli>)
    ApproximateSparseList<Bernoulli>.SetToFunction<T2>(IEnumerable<T2>, Func<T2, Bernoulli>)
    ApproximateSparseList<Bernoulli>.SetToFunction<T1, T2>(SparseList<T1>, SparseList<T2>, Func<T1, T2, Bernoulli>)
    ApproximateSparseList<Bernoulli>.SetToFunction<T1, T2>(ISparseEnumerable<T1>, ISparseEnumerable<T2>, Func<T1, T2, Bernoulli>)
    ApproximateSparseList<Bernoulli>.SetToFunction<T1, T2>(IEnumerable<T1>, IEnumerable<T2>, Func<T1, T2, Bernoulli>)
    ApproximateSparseList<Bernoulli>.SetToFunction<T1, T2, T3>(ISparseEnumerable<T1>, ISparseEnumerable<T2>, ISparseEnumerable<T3>, Func<T1, T2, T3, Bernoulli>)
    ApproximateSparseList<Bernoulli>.SetToFunction<T1, T2, T3>(IEnumerable<T1>, IEnumerable<T2>, IEnumerable<T3>, Func<T1, T2, T3, Bernoulli>)
    ApproximateSparseList<Bernoulli>.SetToFunction<T1, T2, T3, T4>(ISparseList<T1>, ISparseList<T2>, ISparseList<T3>, ISparseList<T4>, Func<T1, T2, T3, T4, Bernoulli>)
    ApproximateSparseList<Bernoulli>.SetToFunction<T1, T2, T3, T4>(IEnumerable<T1>, IEnumerable<T2>, IEnumerable<T3>, IEnumerable<T4>, Func<T1, T2, T3, T4, Bernoulli>)
    ApproximateSparseList<Bernoulli>.SetToFunctionInPlace<T1>(SparseList<T1>, Func<Bernoulli, T1, Bernoulli>)
    SparseList<Bernoulli>.Sparsity
    SparseList<Bernoulli>.SparseValues
    SparseList<Bernoulli>.CommonValue
    SparseList<Bernoulli>.Count
    SparseList<Bernoulli>.SparseCount
    SparseList<Bernoulli>.FromSize(Int32)
    SparseList<Bernoulli>.Constant(Int32, Bernoulli)
    SparseList<Bernoulli>.Copy(IList<Bernoulli>)
    SparseList<Bernoulli>.FromSparseValues(Int32, Bernoulli, List<ValueAtIndex<Bernoulli>>)
    SparseList<Bernoulli>.GetSparseIndex(Int32)
    SparseList<Bernoulli>.HasCommonElements
    SparseList<Bernoulli>.GetFirstCommonIndex()
    SparseList<Bernoulli>.GetEnumerator()
    SparseList<Bernoulli>.IEnumerable.GetEnumerator()
    SparseList<Bernoulli>.SetAllElementsTo(Bernoulli)
    SparseList<Bernoulli>.SetTo(IList<Bernoulli>)
    SparseList<Bernoulli>.CheckCompatible<T2>(IList<T2>, String)
    SparseList<Bernoulli>.SetTo(SparseList<Bernoulli>)
    SparseList<Bernoulli>.SetTo(IEnumerable<Bernoulli>)
    SparseList<Bernoulli>.ICloneable.Clone()
    SparseList<Bernoulli>.EqualsAll(Bernoulli)
    SparseList<Bernoulli>.All(Converter<Bernoulli, Boolean>)
    SparseList<Bernoulli>.Any(Converter<Bernoulli, Boolean>)
    SparseList<Bernoulli>.IndexOfAll(Converter<Bernoulli, Boolean>)
    SparseList<Bernoulli>.Reduce<TRes>(TRes, Func<TRes, Bernoulli, TRes>)
    SparseList<Bernoulli>.Reduce<TRes>(TRes, Func<TRes, Bernoulli, TRes>, Func<TRes, Bernoulli, Int32, TRes>)
    SparseList<Bernoulli>.Reduce<TRes, T1>(TRes, ISparseEnumerable<T1>, Func<TRes, Bernoulli, T1, TRes>, Func<TRes, Bernoulli, T1, Int32, TRes>)
    SparseList<Bernoulli>.Reduce<TRes, T1, T2>(TRes, ISparseEnumerable<T1>, ISparseEnumerable<T2>, Func<TRes, Bernoulli, T1, T2, TRes>, Func<TRes, Bernoulli, T1, T2, Int32, TRes>)
    SparseList<Bernoulli>.Reduce<TRes, T2>(TRes, IEnumerable<T2>, Func<TRes, Bernoulli, T2, TRes>)
    SparseList<Bernoulli>.Reduce<TRes, T1, T2>(TRes, IList<T1>, IList<T2>, Func<TRes, Bernoulli, T1, T2, TRes>)
    SparseList<Bernoulli>.Contains(Bernoulli)
    SparseList<Bernoulli>.IndexOf(Bernoulli)
    SparseList<Bernoulli>.IsReadOnly
    SparseList<Bernoulli>.CopyTo(Bernoulli[], Int32)
    SparseList<Bernoulli>.Insert(Int32, Bernoulli)
    SparseList<Bernoulli>.RemoveAt(Int32)
    SparseList<Bernoulli>.Add(Bernoulli)
    SparseList<Bernoulli>.Clear()
    SparseList<Bernoulli>.Remove(Bernoulli)
    SparseList<Bernoulli>.IList.Add(Object)
    SparseList<Bernoulli>.IList.Contains(Object)
    SparseList<Bernoulli>.IList.IndexOf(Object)
    SparseList<Bernoulli>.IList.Insert(Int32, Object)
    SparseList<Bernoulli>.IList.IsFixedSize
    SparseList<Bernoulli>.IList.Remove(Object)
    SparseList<Bernoulli>.IList.Item[Int32]
    SparseList<Bernoulli>.ICollection.CopyTo(Array, Int32)
    SparseList<Bernoulli>.ICollection.IsSynchronized
    SparseList<Bernoulli>.ICollection.SyncRoot
    SparseList<Bernoulli>.ToArray<T2>(IList<T2>)
    SparseList<Bernoulli>.ToString()
    SparseList<Bernoulli>.ToString(String)
    SparseList<Bernoulli>.ToArray()
    SparseList<Bernoulli>.ToList()
    SparseList<Bernoulli>.GetSparseEnumerator()
    Object.Equals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Namespace: Microsoft.ML.Probabilistic.Distributions
    Assembly: Microsoft.ML.Probabilistic.dll
    Syntax
    [Serializable]
    [Quality(QualityBand.Stable)]
    [DataContract]
    public class SparseBernoulliList : SparseDistributionList<Bernoulli, bool, SparseBernoulliList>, ISparseList<Bernoulli>, ISparseEnumerable<Bernoulli>, IList<Bernoulli>, ICollection<Bernoulli>, IEnumerable<Bernoulli>, IList, ICollection, IEnumerable, IDistribution<ISparseList<bool>>, IDistribution, ICloneable, Diffable, SettableToUniform, HasPoint<ISparseList<bool>>, CanGetLogProb<ISparseList<bool>>, Sampleable<ISparseList<bool>>, SettableTo<SparseBernoulliList>, SettableToProduct<SparseBernoulliList>, SettableToProduct<SparseBernoulliList, SparseBernoulliList>, SettableToPower<SparseBernoulliList>, SettableToRatio<SparseBernoulliList>, SettableToRatio<SparseBernoulliList, SparseBernoulliList>, SettableToWeightedSum<SparseBernoulliList>, CanGetLogAverageOf<SparseBernoulliList>, CanGetLogAverageOfPower<SparseBernoulliList>, CanGetAverageLog<SparseBernoulliList>, CanGetMean<ISparseList<double>>, CanGetVariance<ISparseList<double>>

    Constructors

    SparseBernoulliList()

    Initializes a new instance of the SparseBernoulliList class

    Declaration
    public SparseBernoulliList()

    Methods

    FromLogOdds(ISparseList<Double>)

    Returns a new instance of the SparseBernoulliList class of a given size from a sparse list of log odds.

    Declaration
    public static SparseBernoulliList FromLogOdds(ISparseList<double> logOdds)
    Parameters
    Type Name Description
    ISparseList<Double> logOdds

    The sparse list of log odds.

    Returns
    Type Description
    SparseBernoulliList

    The new SparseBernoulliList instance.

    FromLogOdds(ISparseList<Double>, Double)

    Returns a new instance of the SparseBernoulliList class of a given size from a sparse list of log odds.

    Declaration
    public static SparseBernoulliList FromLogOdds(ISparseList<double> logOdds, double tolerance)
    Parameters
    Type Name Description
    ISparseList<Double> logOdds

    The sparse list of log odds.

    Double tolerance

    The tolerance for the approximation.

    Returns
    Type Description
    SparseBernoulliList

    The new SparseBernoulliList instance.

    FromLogOdds(Int32, Double)

    Returns a new instance of the SparseBernoulliList class of a given size, with each element having a given log odds.

    Declaration
    public static SparseBernoulliList FromLogOdds(int size, double logOdds)
    Parameters
    Type Name Description
    Int32 size

    The size of the list.

    Double logOdds

    The desired log odds.

    Returns
    Type Description
    SparseBernoulliList

    The new SparseBernoulliList instance.

    FromLogOdds(Int32, Double, Double)

    Returns a new instance of the SparseBernoulliList class of a given size, with each element having a given log odds.

    Declaration
    public static SparseBernoulliList FromLogOdds(int size, double logOdds, double tolerance)
    Parameters
    Type Name Description
    Int32 size

    The size of the list.

    Double logOdds

    The desired log odds.

    Double tolerance

    The tolerance for the approximation.

    Returns
    Type Description
    SparseBernoulliList

    The new SparseBernoulliList instance.

    FromProbTrue(ISparseList<Double>)

    Returns a new instance of the SparseBernoulliList class of a given size from a sparse list of probability true.

    Declaration
    public static SparseBernoulliList FromProbTrue(ISparseList<double> probTrue)
    Parameters
    Type Name Description
    ISparseList<Double> probTrue

    The sparse list of probability of true.

    Returns
    Type Description
    SparseBernoulliList

    The new SparseBernoulliList instance.

    FromProbTrue(ISparseList<Double>, Double)

    Returns a new instance of the SparseBernoulliList class of a given size from a sparse list of probability true.

    Declaration
    public static SparseBernoulliList FromProbTrue(ISparseList<double> probTrue, double tolerance)
    Parameters
    Type Name Description
    ISparseList<Double> probTrue

    The sparse list of probability of true.

    Double tolerance

    The tolerance for the approximation.

    Returns
    Type Description
    SparseBernoulliList

    The new SparseBernoulliList instance.

    FromProbTrue(Int32, Double)

    Returns a new instance of the SparseBernoulliList class of a given size, with each element having a given probability of true.

    Declaration
    public static SparseBernoulliList FromProbTrue(int size, double probTrue)
    Parameters
    Type Name Description
    Int32 size

    The size of the list.

    Double probTrue

    The desired probability of true.

    Returns
    Type Description
    SparseBernoulliList

    The new SparseBernoulliList instance.

    FromProbTrue(Int32, Double, Double)

    Returns a new instance of the SparseBernoulliList class, with each element having a given probability of true.

    Declaration
    public static SparseBernoulliList FromProbTrue(int size, double probTrue, double tolerance)
    Parameters
    Type Name Description
    Int32 size

    The size of the list.

    Double probTrue

    The desired probability of true.

    Double tolerance

    The tolerance for the approximation.

    Returns
    Type Description
    SparseBernoulliList

    The new SparseBernoulliList instance.

    Sample(ISparseList<Double>)

    Samples from a SparseBernoulliList with the specified probability of true.

    Declaration
    public static ISparseList<bool> Sample(ISparseList<double> probTrue)
    Parameters
    Type Name Description
    ISparseList<Double> probTrue

    Probability of true.

    Returns
    Type Description
    ISparseList<Boolean>

    The sample.

    Operators

    Division(SparseBernoulliList, SparseBernoulliList)

    Creates a SparseBernoulliList distribution which is the ratio of two others.

    Declaration
    public static SparseBernoulliList operator /(SparseBernoulliList numerator, SparseBernoulliList denominator)
    Parameters
    Type Name Description
    SparseBernoulliList numerator

    The numerator.

    SparseBernoulliList denominator

    The denominator.

    Returns
    Type Description
    SparseBernoulliList

    The resulting SparseBernoulliList distribution.

    ExclusiveOr(SparseBernoulliList, Double)

    Creates a SparseBernoulliList distribution which is the power of another.

    Declaration
    public static SparseBernoulliList operator ^(SparseBernoulliList dist, double exponent)
    Parameters
    Type Name Description
    SparseBernoulliList dist

    The other distribution.

    Double exponent

    The exponent.

    Returns
    Type Description
    SparseBernoulliList

    The resulting SparseBernoulliList distribution.

    Multiply(SparseBernoulliList, SparseBernoulliList)

    Creates a SparseBernoulliList distribution which is the product of two others.

    Declaration
    public static SparseBernoulliList operator *(SparseBernoulliList a, SparseBernoulliList b)
    Parameters
    Type Name Description
    SparseBernoulliList a

    The first distribution.

    SparseBernoulliList b

    The second distribution.

    Returns
    Type Description
    SparseBernoulliList

    The resulting SparseBernoulliList distribution.

    Implements

    ISparseList<T>
    ISparseEnumerable<T>
    System.Collections.Generic.IList<T>
    System.Collections.Generic.ICollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IList
    System.Collections.ICollection
    System.Collections.IEnumerable
    IDistribution<T>
    IDistribution
    System.ICloneable
    Diffable
    SettableToUniform
    HasPoint<T>
    CanGetLogProb<T>
    Sampleable<T>
    SettableTo<T>
    SettableToProduct<T>
    SettableToProduct<T, U>
    SettableToPower<T>
    SettableToRatio<T>
    SettableToRatio<T, U>
    SettableToWeightedSum<T>
    CanGetLogAverageOf<T>
    CanGetLogAverageOfPower<T>
    CanGetAverageLog<T>
    CanGetMean<MeanType>
    CanGetVariance<VarType>

    Extension Methods

    CollectionExtensions.AddRange<T>(ICollection<T>, IEnumerable<T>)
    CollectionExtensions.ContainsAll<T>(ICollection<T>, IEnumerable<T>)
    CollectionExtensions.ContainsAny<T>(ICollection<T>, IEnumerable<T>)
    EnumerableExtensions.ForEach<T>(IEnumerable<T>, Action<T>)
    EnumerableExtensions.ForEach<T>(IEnumerable, Action<T>)
    EnumerableExtensions.ForEach<T>(IEnumerable<T>, Action<Int32, T>)
    EnumerableExtensions.ForEach<T>(IEnumerable, Action<Int32, T>)
    EnumerableExtensions.Sum<TSource>(IEnumerable<TSource>, Func<TSource, UInt32>)
    EnumerableExtensions.Sum<TSource>(IEnumerable<TSource>, Func<TSource, UInt64>)
    EnumerableExtensions.ValueEquals<T>(IEnumerable<T>, IEnumerable<T>)
    EnumerableExtensions.IndexOf<T>(IEnumerable<T>, T)
    EnumerableExtensions.IndexOf<T>(IEnumerable, T)
    EnumerableExtensions.FindIndex<T>(IEnumerable<T>, Predicate<T>)
    EnumerableExtensions.FindIndex<T>(IEnumerable, Predicate<T>)
    EnumerableExtensions.FindAllIndex<T>(IEnumerable<T>, Predicate<T>)
    EnumerableExtensions.IndexOfAll<T>(IEnumerable<T>, T)
    EnumerableExtensions.Skip<T>(IEnumerable<T>, Int32, out List<T>)
    EnumerableExtensions.CopyTo<T>(IEnumerable<T>, T[], Int32)
    EnumerableExtensions.ToReadOnlyList<T>(IEnumerable<T>)
    IEnumerableExensions.EnumerableReduce<T, TRes>(IEnumerable<T>, TRes, Func<TRes, T, TRes>, Func<TRes, T, Int32, TRes>)
    IEnumerableExensions.EnumerableSum<T>(IEnumerable<T>, Func<T, Double>)
    IEnumerableExensions.ListZip<TFirst, TSecond, TResult>(IList<TFirst>, IEnumerable<TSecond>, Func<TFirst, TSecond, TResult>)
    IEnumerableExensions.ListZip<TFirst, TSecond, TThird, TResult>(IList<TFirst>, IEnumerable<TSecond>, IEnumerable<TThird>, Func<TFirst, TSecond, TThird, TResult>)
    IEnumerableExensions.ListZip<TFirst, TSecond, TThird, TFourth, TResult>(IList<TFirst>, IList<TSecond>, IList<TThird>, IList<TFourth>, Func<TFirst, TSecond, TThird, TFourth, TResult>)
    IListExtensions.IsSparse<T>(IList<T>)
    IListExtensions.ListSelect<T, T2>(IList<T>, Func<T, T2>)
    IListExtensions.ListReduce<T, TRes>(IList<T>, TRes, Func<TRes, T, TRes>)
    IListExtensions.ListReduce<T, T2, TRes>(IList<T>, IEnumerable<T2>, TRes, Func<TRes, T, T2, TRes>)
    IListExtensions.SetTo<T>(IList<T>, IEnumerable<T>)
    IListExtensions.AsReadOnly<T>(IList<T>)
    ReadOnlyArray.ToReadOnlyArray<T>(IEnumerable<T>)
    In This Article
    Back to top Copyright © .NET Foundation. All rights reserved.