Struct Binomial
Binomial distribution over the integers [0,n]
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[Serializable]
[DataContract]
[Quality(QualityBand.Experimental)]
public struct Binomial : IDistribution<int>, IDistribution, ICloneable, Diffable, SettableToUniform, HasPoint<int>, CanGetLogProb<int>, SettableTo<Binomial>, SettableToProduct<Binomial>, SettableToProduct<Binomial, Binomial>, SettableToRatio<Binomial>, SettableToRatio<Binomial, Binomial>, SettableToPower<Binomial>, SettableToWeightedSum<Binomial>, CanGetLogAverageOf<Binomial>, CanGetLogAverageOfPower<Binomial>, CanGetAverageLog<Binomial>, Sampleable<int>, CanGetMean<double>, CanGetVariance<double>, CanGetMeanAndVarianceOut<double, double>
Constructors
Binomial(Int32, Double)
Declaration
public Binomial(int trialCount, double probSuccess)
Parameters
Type |
Name |
Description |
Int32 |
trialCount |
|
Double |
probSuccess |
|
Fields
A
Declaration
[DataMember]
public double A
Field Value
B
Declaration
[DataMember]
public double B
Field Value
LogOdds
Declaration
[DataMember]
public double LogOdds
Field Value
TrialCount
Declaration
[DataMember]
public int TrialCount
Field Value
Properties
IsPointMass
Declaration
[IgnoreDataMember]
public readonly bool IsPointMass { get; }
Property Value
Point
Declaration
[IgnoreDataMember]
public int Point { get; set; }
Property Value
ProbFailure
Declaration
public readonly double ProbFailure { get; }
Property Value
ProbSuccess
Declaration
public readonly double ProbSuccess { get; }
Property Value
Methods
Clone()
Declaration
Returns
FromNatural(Int32, Double, Double, Double)
Declaration
[Construction(new string[]{"TrialCount", "LogOdds", "A", "B"})]
public static Binomial FromNatural(int trialCount, double logOdds, double a = 1, double b = 1)
Parameters
Returns
GetAverageLog(Binomial)
Declaration
public double GetAverageLog(Binomial that)
Parameters
Returns
GetLogAverageOf(Binomial)
Declaration
public double GetLogAverageOf(Binomial that)
Parameters
Returns
GetLogAverageOfPower(Binomial, Double)
Declaration
public double GetLogAverageOfPower(Binomial that, double power)
Parameters
Returns
GetLogProb(Int32)
Declaration
public double GetLogProb(int value)
Parameters
Type |
Name |
Description |
Int32 |
value |
|
Returns
GetMean()
Declaration
Returns
GetMeanAndVariance(out Double, out Double)
Declaration
public void GetMeanAndVariance(out double mean, out double variance)
Parameters
GetVariance()
Declaration
public double GetVariance()
Returns
Declaration
Returns
MaxDiff(Object)
Declaration
public double MaxDiff(object that)
Parameters
Type |
Name |
Description |
Object |
that |
|
Returns
PointMass(Int32, Int32)
Declaration
public static Binomial PointMass(int trialCount, int value)
Parameters
Type |
Name |
Description |
Int32 |
trialCount |
|
Int32 |
value |
|
Returns
Sample()
Declaration
Returns
Sample(Int32)
Declaration
public int Sample(int result)
Parameters
Type |
Name |
Description |
Int32 |
result |
|
Returns
SetTo(Binomial)
Declaration
public void SetTo(Binomial that)
Parameters
SetToPower(Binomial, Double)
Declaration
public void SetToPower(Binomial dist, double exponent)
Parameters
SetToProduct(Binomial, Binomial)
Declaration
public void SetToProduct(Binomial a, Binomial b)
Parameters
SetToRatio(Binomial, Binomial, Boolean)
Set this distribution to equal the ratio of two distributions
Declaration
public void SetToRatio(Binomial numerator, Binomial denominator, bool forceProper = false)
Parameters
SetToSum(Double, Binomial, Double, Binomial)
Declaration
public void SetToSum(double weight1, Binomial value1, double weight2, Binomial value2)
Parameters
Declaration
public void SetToUniform()
ToString()
Declaration
public override string ToString()
Returns
Overrides
Declaration
public static Binomial Uniform(int trialCount)
Parameters
Type |
Name |
Description |
Int32 |
trialCount |
|
Returns
Implements