Class VariableGibbsOp
Provides outgoing messages for VariableGibbs<T>(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), "VariableGibbs<>", new Type[]{})]
[Quality(QualityBand.Preview)]
public static class VariableGibbsOp
Methods
DefGibbs<TDist, T>(TDist, TDist)
Declaration
public static TDist DefGibbs<TDist, T>(TDist Use, TDist result)
where TDist : IDistribution<T>, SettableTo<TDist>
Parameters
Type | Name | Description |
---|---|---|
TDist | Use | |
TDist | result |
Returns
Type | Description |
---|---|
TDist |
Type Parameters
Name | Description |
---|---|
TDist | |
T |
DefGibbs<TDist, T>(GibbsMarginal<TDist, T>, T)
Gibbs sample message to 'Def'
Declaration
public static T DefGibbs<TDist, T>(GibbsMarginal<TDist, T> marginal, T result)
where TDist : IDistribution<T>, Sampleable<T>
Parameters
Type | Name | Description |
---|---|---|
GibbsMarginal<TDist, T> | marginal | Incoming message from 'marginal'. Must be a proper distribution. If uniform, the result will be uniform. |
T | result | Modified to contain the outgoing message |
Returns
Type | Description |
---|---|
T |
|
Type Parameters
Name | Description |
---|---|
TDist | |
T |
Remarks
The outgoing message is the current Gibbs sample.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
GibbsEvidence<TDist, T>(TDist, TDist, GibbsMarginal<TDist, T>)
Gibbs evidence
Declaration
public static double GibbsEvidence<TDist, T>(TDist Use, TDist Def, GibbsMarginal<TDist, T> marginal)
where TDist : IDistribution<T>, Sampleable<T>, CanGetLogAverageOf<TDist>
Parameters
Type | Name | Description |
---|---|---|
TDist | Use | |
TDist | Def | |
GibbsMarginal<TDist, T> | marginal |
Returns
Type | Description |
---|---|
Double |
Type Parameters
Name | Description |
---|---|
TDist | |
T |
MarginalGibbs<TDist, T>(TDist, TDist, GibbsMarginal<TDist, T>)
Gibbs message to 'Marginal'.
Declaration
public static GibbsMarginal<TDist, T> MarginalGibbs<TDist, T>(TDist Use, TDist Def, GibbsMarginal<TDist, T> to_marginal)
where TDist : IDistribution<T>, SettableToProduct<TDist>, SettableTo<TDist>, Sampleable<T>
Parameters
Type | Name | Description |
---|---|---|
TDist | Use | Incoming message from 'use'. |
TDist | Def | Incoming message from 'def'. Must be a proper distribution. If uniform, the result will be uniform. |
GibbsMarginal<TDist, T> | to_marginal |
Returns
Type | Description |
---|---|
GibbsMarginal<TDist, T> |
Type Parameters
Name | Description |
---|---|
TDist | |
T |
Remarks
The outgoing message is the product of 'Def' and 'Uses' messages.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
MarginalGibbs<TDist, T>(T, TDist, GibbsMarginal<TDist, T>)
Declaration
public static GibbsMarginal<TDist, T> MarginalGibbs<TDist, T>(T Use, TDist Def, GibbsMarginal<TDist, T> to_marginal)
where TDist : IDistribution<T>, Sampleable<T>
Parameters
Type | Name | Description |
---|---|---|
T | Use | |
TDist | Def | |
GibbsMarginal<TDist, T> | to_marginal |
Returns
Type | Description |
---|---|
GibbsMarginal<TDist, T> |
Type Parameters
Name | Description |
---|---|
TDist | |
T |
UseGibbs<TDist, T>(TDist, TDist)
Gibbs distribution message to 'Def'
Declaration
public static TDist UseGibbs<TDist, T>(TDist Def, TDist result)
where TDist : SettableTo<TDist>
Parameters
Type | Name | Description |
---|---|---|
TDist | Def | Incoming message from 'def'. Must be a proper distribution. If uniform, the result will be uniform. |
TDist | result | Modified to contain the outgoing message |
Returns
Type | Description |
---|---|
TDist |
|
Type Parameters
Name | Description |
---|---|
TDist | |
T |
Remarks
The outgoing message is the product of the 'Def' message with all 'Uses' messages except the current
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
UseGibbs<TDist, T>(GibbsMarginal<TDist, T>, T)
Gibbs sample message to 'Use'
Declaration
public static T UseGibbs<TDist, T>(GibbsMarginal<TDist, T> marginal, T result)
where TDist : IDistribution<T>, Sampleable<T>
Parameters
Type | Name | Description |
---|---|---|
GibbsMarginal<TDist, T> | marginal | Incoming message from 'marginal'. Must be a proper distribution. If uniform, the result will be uniform. |
T | result | Modified to contain the outgoing message |
Returns
Type | Description |
---|---|
T |
|
Type Parameters
Name | Description |
---|---|
TDist | |
T |
Remarks
The outgoing message is the current Gibbs sample.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|