Class IndexOfMaximumStochasticOp
Provides outgoing messages for IndexOfMaximumDouble(IList<Double>), given random arguments to the function.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(typeof(MMath), "IndexOfMaximumDouble", new Type[]{}, Default = true)]
[Quality(QualityBand.Experimental)]
[Buffers(new string[]{"Buffers"})]
public static class IndexOfMaximumStochasticOp
Methods
Buffers<GaussianList>(IndexOfMaximumBuffer[], GaussianList, Discrete)
Update the buffer Buffers
.
Declaration
public static IndexOfMaximumBuffer[] Buffers<GaussianList>(IndexOfMaximumBuffer[] Buffers, GaussianList list, Discrete IndexOfMaximumDouble)
where GaussianList : IList<Gaussian>
Parameters
Type | Name | Description |
---|---|---|
IndexOfMaximumBuffer[] | Buffers | Buffer |
GaussianList | list | Incoming message from |
Discrete | IndexOfMaximumDouble | Incoming message from |
Returns
Type | Description |
---|---|
IndexOfMaximumBuffer[] | New value of buffer |
Type Parameters
Name | Description |
---|---|
GaussianList | The type of an incoming message from |
Remarks
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
BuffersInit<GaussianList>(GaussianList, Discrete)
Initialize the buffer Buffers
.
Declaration
public static IndexOfMaximumBuffer[] BuffersInit<GaussianList>(GaussianList list, Discrete IndexOfMaximumDouble)
where GaussianList : IList<Gaussian>
Parameters
Type | Name | Description |
---|---|---|
GaussianList | list | Incoming message from |
Discrete | IndexOfMaximumDouble | Incoming message from |
Returns
Type | Description |
---|---|
IndexOfMaximumBuffer[] | Initial value of buffer |
Type Parameters
Name | Description |
---|---|
GaussianList | The type of an incoming message from |
Remarks
IndexOfMaximumDoubleAverageConditional<GaussianList>(GaussianList, IndexOfMaximumBuffer[])
EP message to indexOfMaximumDouble
.
Declaration
public static Discrete IndexOfMaximumDoubleAverageConditional<GaussianList>(GaussianList list, IndexOfMaximumBuffer[] Buffers)
where GaussianList : DistributionStructArray<Gaussian, double>
Parameters
Type | Name | Description |
---|---|---|
GaussianList | list | Incoming message from |
IndexOfMaximumBuffer[] | Buffers | Buffer |
Returns
Type | Description |
---|---|
Discrete | The outgoing EP message to the |
Type Parameters
Name | Description |
---|---|
GaussianList | The type of an incoming message from |
Remarks
The outgoing message is a distribution matching the moments of indexOfMaximumDouble
as the random arguments are varied. The formula is proj[p(indexOfMaximumDouble) sum_(list) p(list) factor(indexOfMaximumDouble,list)]/p(indexOfMaximumDouble)
.
ListAverageConditional<GaussianList>(IndexOfMaximumBuffer[], GaussianList, Discrete, GaussianList)
EP message to list
.
Declaration
public static GaussianList ListAverageConditional<GaussianList>(IndexOfMaximumBuffer[] Buffers, GaussianList list, Discrete IndexOfMaximumDouble, GaussianList result)
where GaussianList : DistributionStructArray<Gaussian, double>
Parameters
Type | Name | Description |
---|---|---|
IndexOfMaximumBuffer[] | Buffers | Buffer |
GaussianList | list | Incoming message from |
Discrete | IndexOfMaximumDouble | Incoming message from |
GaussianList | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
GaussianList |
|
Type Parameters
Name | Description |
---|---|
GaussianList | The type of an incoming message from |
Remarks
The outgoing message is a distribution matching the moments of list
as the random arguments are varied. The formula is proj[p(list) sum_(indexOfMaximumDouble) p(indexOfMaximumDouble) factor(indexOfMaximumDouble,list)]/p(list)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
LogAverageFactor<GaussianList>(GaussianList, GaussianList, IndexOfMaximumBuffer[], Discrete)
Evidence message for EP.
Declaration
public static double LogAverageFactor<GaussianList>(GaussianList list, GaussianList to_list, IndexOfMaximumBuffer[] Buffers, Discrete IndexOfMaximumDouble)
where GaussianList : DistributionStructArray<Gaussian, double>
Parameters
Type | Name | Description |
---|---|---|
GaussianList | list | Incoming message from |
GaussianList | to_list | Previous outgoing message to |
IndexOfMaximumBuffer[] | Buffers | Buffer |
Discrete | IndexOfMaximumDouble | Incoming message from |
Returns
Type | Description |
---|---|
Double | Logarithm of the factor's average value across the given argument distributions. |
Type Parameters
Name | Description |
---|---|
GaussianList | The type of an incoming message from |
Remarks
The formula for the result is log(sum_(list,indexOfMaximumDouble) p(list,indexOfMaximumDouble) factor(indexOfMaximumDouble,list))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
LogEvidenceRatio<GaussianList>(GaussianList, GaussianList, Discrete, Discrete, IndexOfMaximumBuffer[])
Evidence message for EP.
Declaration
public static double LogEvidenceRatio<GaussianList>(GaussianList list, GaussianList to_list, Discrete IndexOfMaximumDouble, Discrete to_IndexOfMaximumDouble, IndexOfMaximumBuffer[] Buffers)
where GaussianList : DistributionStructArray<Gaussian, double>
Parameters
Type | Name | Description |
---|---|---|
GaussianList | list | Incoming message from |
GaussianList | to_list | Previous outgoing message to |
Discrete | IndexOfMaximumDouble | Incoming message from |
Discrete | to_IndexOfMaximumDouble | Previous outgoing message to |
IndexOfMaximumBuffer[] | Buffers | Buffer |
Returns
Type | Description |
---|---|
Double | Logarithm of the factor's contribution the EP model evidence. |
Type Parameters
Name | Description |
---|---|
GaussianList | The type of an incoming message from |
Remarks
The formula for the result is log(sum_(list,indexOfMaximumDouble) p(list,indexOfMaximumDouble) factor(indexOfMaximumDouble,list) / sum_indexOfMaximumDouble p(indexOfMaximumDouble) messageTo(indexOfMaximumDouble))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.