Class UsesEqualDefGibbsOp2<T>
Provides outgoing messages for UsesEqualDefGibbs<T>(T, Int32, Int32, Int32, out T, out T, out T), given random arguments to the function.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(typeof(Clone), "UsesEqualDefGibbs<>", new Type[]{})]
[Buffers(new string[]{"sample", "conditional", "marginalEstimator", "sampleAcc", "conditionalAcc"})]
[Quality(QualityBand.Mature)]
public static class UsesEqualDefGibbsOp2<T>
Type Parameters
Name | Description |
---|---|
T | The type of the variable. |
Methods
Conditional<TDist>(IReadOnlyList<TDist>, TDist, TDist)
Declaration
public static TDist Conditional<TDist>(IReadOnlyList<TDist> Uses, TDist Def, TDist result)
where TDist : SettableTo<TDist>, SettableToProduct<TDist>
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyList<TDist> | Uses | |
TDist | Def | |
TDist | result |
Returns
Type | Description |
---|---|
TDist |
Type Parameters
Name | Description |
---|---|
TDist |
ConditionalAcc<TDist>(TDist, Accumulator<TDist>)
Update the buffer conditionalAcc
.
Declaration
public static Accumulator<TDist> ConditionalAcc<TDist>(TDist conditional, Accumulator<TDist> conditionalAcc)
where TDist : ICloneable
Parameters
Type | Name | Description |
---|---|---|
TDist | conditional | Buffer |
Accumulator<TDist> | conditionalAcc | Buffer |
Returns
Type | Description |
---|---|
Accumulator<TDist> | New value of buffer |
Type Parameters
Name | Description |
---|---|
TDist |
Remarks
ConditionalAccInit<TDist>(ICollection<TDist>, Int32, Int32)
Initialize the buffer conditionalAcc
.
Declaration
public static Accumulator<TDist> ConditionalAccInit<TDist>(ICollection<TDist> to_conditionals, int burnIn, int thin)
Parameters
Type | Name | Description |
---|---|---|
ICollection<TDist> | to_conditionals | Previous outgoing message to |
Int32 | burnIn | Constant value for |
Int32 | thin | Constant value for |
Returns
Type | Description |
---|---|
Accumulator<TDist> | Initial value of buffer |
Type Parameters
Name | Description |
---|---|
TDist |
Remarks
ConditionalInit<TDist>(TDist)
Initialize the buffer conditional
.
Declaration
public static TDist ConditionalInit<TDist>(TDist def)
where TDist : ICloneable
Parameters
Type | Name | Description |
---|---|---|
TDist | def | Incoming message from |
Returns
Type | Description |
---|---|
TDist | Initial value of buffer |
Type Parameters
Name | Description |
---|---|
TDist |
Remarks
ConditionalsGibbs<TDist, TDistList>(Accumulator<TDist>, TDistList)
Declaration
public static TDistList ConditionalsGibbs<TDist, TDistList>(Accumulator<TDist> conditionalAcc, TDistList result)
where TDistList : ICollection<TDist>
Parameters
Type | Name | Description |
---|---|---|
Accumulator<TDist> | conditionalAcc | Buffer |
TDistList | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
TDistList |
|
Type Parameters
Name | Description |
---|---|
TDist | |
TDistList |
Remarks
DefGibbs<TDist>(TDist, T)
Declaration
public static T DefGibbs<TDist>(TDist def, T sample)
where TDist : IDistribution<T>
Parameters
Type | Name | Description |
---|---|---|
TDist | def | Incoming message from |
T | sample | Buffer |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
TDist | The type of the distribution over the variable. |
Remarks
DefGibbs<TDist>(IReadOnlyList<TDist>, TDist)
Declaration
public static TDist DefGibbs<TDist>([SkipIfAllUniform] IReadOnlyList<TDist> Uses, TDist result)
where TDist : IDistribution<T>, Sampleable<T>, SettableTo<TDist>, SettableToProduct<TDist>, SettableToRatio<TDist>
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyList<TDist> | Uses | |
TDist | result |
Returns
Type | Description |
---|---|
TDist |
Type Parameters
Name | Description |
---|---|
TDist | The type of the distribution over the variable. |
GibbsEvidence<TDist>(IList<TDist>, TDist, T)
Declaration
public static double GibbsEvidence<TDist>(IList<TDist> Uses, TDist Def, T sample)
where TDist : IDistribution<T>, Sampleable<T>, CanGetLogAverageOf<TDist>, SettableTo<TDist>, SettableToProduct<TDist>
Parameters
Type | Name | Description |
---|---|---|
IList<TDist> | Uses | Incoming message from |
TDist | Def | Incoming message from |
T | sample | Buffer |
Returns
Type | Description |
---|---|
Double |
Type Parameters
Name | Description |
---|---|
TDist |
Remarks
MarginalEstimator<TDist, TAcc>(TDist, TAcc)
Update the buffer marginalEstimator
.
Declaration
public static TAcc MarginalEstimator<TDist, TAcc>(TDist conditional, TAcc marginalEstimator)
where TAcc : Accumulator<TDist>
Parameters
Type | Name | Description |
---|---|---|
TDist | conditional | Buffer |
TAcc | marginalEstimator | Buffer |
Returns
Type | Description |
---|---|
TAcc | New value of buffer |
Type Parameters
Name | Description |
---|---|
TDist | |
TAcc |
Remarks
MarginalEstimatorInit<TDist>(TDist, Int32)
Initialize the buffer marginalEstimator
.
Declaration
public static BurnInAccumulator<TDist> MarginalEstimatorInit<TDist>(TDist to_marginal, int burnIn)
where TDist : IDistribution<T>
Parameters
Type | Name | Description |
---|---|---|
TDist | to_marginal | Previous outgoing message to |
Int32 | burnIn | Constant value for |
Returns
Type | Description |
---|---|
BurnInAccumulator<TDist> | Initial value of buffer |
Type Parameters
Name | Description |
---|---|
TDist |
Remarks
MarginalGibbs<TDist>(BurnInAccumulator<TDist>, TDist)
Declaration
public static TDist MarginalGibbs<TDist>(BurnInAccumulator<TDist> marginalEstimator, TDist result)
Parameters
Type | Name | Description |
---|---|---|
BurnInAccumulator<TDist> | marginalEstimator | Buffer |
TDist | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
TDist |
|
Type Parameters
Name | Description |
---|---|
TDist |
Remarks
Sample<TDist>(TDist, TDist)
Update the buffer sample
.
Declaration
public static T Sample<TDist>(TDist def, TDist conditional)
where TDist : IDistribution<T>, Sampleable<T>
Parameters
Type | Name | Description |
---|---|---|
TDist | def | Incoming message from |
TDist | conditional | Buffer |
Returns
Type | Description |
---|---|
T | New value of buffer |
Type Parameters
Name | Description |
---|---|
TDist |
Remarks
SampleAcc(T, Accumulator<T>)
Update the buffer sampleAcc
.
Declaration
public static Accumulator<T> SampleAcc(T sample, Accumulator<T> sampleAcc)
Parameters
Type | Name | Description |
---|---|---|
T | sample | Buffer |
Accumulator<T> | sampleAcc | Buffer |
Returns
Type | Description |
---|---|
Accumulator<T> | New value of buffer |
Remarks
SampleAccInit(ICollection<T>, Int32, Int32)
Initialize the buffer sampleAcc
.
Declaration
public static Accumulator<T> SampleAccInit(ICollection<T> to_samples, int burnIn, int thin)
Parameters
Type | Name | Description |
---|---|---|
ICollection<T> | to_samples | Previous outgoing message to |
Int32 | burnIn | Constant value for |
Int32 | thin | Constant value for |
Returns
Type | Description |
---|---|
Accumulator<T> | Initial value of buffer |
Remarks
SamplesGibbs<TList>(Accumulator<T>, TList)
Declaration
public static TList SamplesGibbs<TList>(Accumulator<T> sampleAcc, TList result)
where TList : ICollection<T>
Parameters
Type | Name | Description |
---|---|---|
Accumulator<T> | sampleAcc | Buffer |
TList | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
TList |
|
Type Parameters
Name | Description |
---|---|
TList |
Remarks
UsesGibbs<TDist>(TDist, T, Int32, T)
Declaration
public static T UsesGibbs<TDist>(TDist def, T sample, int resultIndex, T result)
where TDist : IDistribution<T>
Parameters
Type | Name | Description |
---|---|---|
TDist | def | Incoming message from |
T | sample | Buffer |
Int32 | resultIndex | Index of the |
T | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
T |
|
Type Parameters
Name | Description |
---|---|
TDist |
Remarks
UsesGibbs<TDist>(ICollection<TDist>, TDist, Int32, TDist)
Declaration
public static TDist UsesGibbs<TDist>(ICollection<TDist> Uses, TDist Def, int resultIndex, TDist result)
where TDist : IDistribution<T>, Sampleable<T>, SettableTo<TDist>, SettableToProduct<TDist>, SettableToRatio<TDist>
Parameters
Type | Name | Description |
---|---|---|
ICollection<TDist> | Uses | Incoming message from |
TDist | Def | Incoming message from |
Int32 | resultIndex | Index of the |
TDist | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
TDist |
|
Type Parameters
Name | Description |
---|---|
TDist |
Remarks
UsesGibbsInit<TDist>(TDist, Int32)
Declaration
public static TDist UsesGibbsInit<TDist>(TDist Def, int resultIndex)
where TDist : ICloneable
Parameters
Type | Name | Description |
---|---|---|
TDist | Def | Incoming message from |
Int32 | resultIndex | Index of the |
Returns
Type | Description |
---|---|
TDist |
Type Parameters
Name | Description |
---|---|
TDist | The type of the distribution over the variable. |
Remarks