Class GetDeepJaggedItemsOp<T>
Provides outgoing messages for GetDeepJaggedItems<T>(IReadOnlyList<T>, IReadOnlyList<IReadOnlyList<IReadOnlyList<Int32>>>), given random arguments to the function.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(typeof(Collection), "GetDeepJaggedItems<>", new Type[]{}, Default = true)]
[Quality(QualityBand.Mature)]
[Buffers(new string[]{"marginal"})]
public static class GetDeepJaggedItemsOp<T>
Type Parameters
| Name | Description |
|---|---|
| T | The type of an item. |
Methods
ArrayAverageConditional<DistributionType, ArrayType>(IList<IList<IList<T>>>, IList<IList<IList<Int32>>>, ArrayType)
EP message to array.
Declaration
public static ArrayType ArrayAverageConditional<DistributionType, ArrayType>([SkipIfAllUniform] IList<IList<IList<T>>> items, IList<IList<IList<int>>> indices, ArrayType result)
where DistributionType : HasPoint<T> where ArrayType : IList<DistributionType>, SettableToUniform
Parameters
| Type | Name | Description |
|---|---|---|
| IList<IList<IList<T>>> | items | Incoming message from |
| IList<IList<IList<Int32>>> | indices | Incoming message from |
| ArrayType | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| ArrayType |
|
Type Parameters
| Name | Description |
|---|---|
| DistributionType | The type of a distribution over array elements. |
| ArrayType | The type of the resulting array. |
Remarks
The outgoing message is a distribution matching the moments of array as the random arguments are varied. The formula is proj[p(array) sum_(items,indices) p(items,indices) factor(items,array,indices)]/p(array).
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|
ArrayAverageConditional<ItemType, ItemType2, DistributionType, ArrayType>(IList<ItemType>, IList<IList<IList<Int32>>>, ArrayType)
Declaration
public static ArrayType ArrayAverageConditional<ItemType, ItemType2, DistributionType, ArrayType>([SkipIfAllUniform] IList<ItemType> items, IList<IList<IList<int>>> indices, ArrayType result)
where ItemType : IList<ItemType2> where ItemType2 : IList<DistributionType> where DistributionType : SettableToProduct<DistributionType> where ArrayType : IList<DistributionType>, SettableToUniform
Parameters
| Type | Name | Description |
|---|---|---|
| IList<ItemType> | items | |
| IList<IList<IList<Int32>>> | indices | |
| ArrayType | result |
Returns
| Type | Description |
|---|---|
| ArrayType |
Type Parameters
| Name | Description |
|---|---|
| ItemType | The type of a sub-array. |
| ItemType2 | The type of a sub-sub-array. |
| DistributionType | The type of a distribution over array elements. |
| ArrayType | The type of the resulting array. |
ArrayAverageLogarithm<DistributionType, ArrayType>(IList<IList<IList<T>>>, IList<IList<IList<Int32>>>, ArrayType)
VMP message to array.
Declaration
public static ArrayType ArrayAverageLogarithm<DistributionType, ArrayType>(IList<IList<IList<T>>> items, IList<IList<IList<int>>> indices, ArrayType result)
where DistributionType : HasPoint<T> where ArrayType : IList<DistributionType>, SettableToUniform
Parameters
| Type | Name | Description |
|---|---|---|
| IList<IList<IList<T>>> | items | Incoming message from |
| IList<IList<IList<Int32>>> | indices | Incoming message from |
| ArrayType | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| ArrayType |
|
Type Parameters
| Name | Description |
|---|---|
| DistributionType | The type of a distribution over array elements. |
| ArrayType | The type of the resulting array. |
Remarks
The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except array. Because the factor is deterministic, items is integrated out before taking the logarithm. The formula is exp(sum_(indices) p(indices) log(sum_items p(items) factor(items,array,indices))).
ArrayAverageLogarithm<ItemType, ItemType2, DistributionType, ArrayType>(IList<ItemType>, IList<IList<IList<Int32>>>, ArrayType)
VMP message to array.
Declaration
public static ArrayType ArrayAverageLogarithm<ItemType, ItemType2, DistributionType, ArrayType>([SkipIfAllUniform] IList<ItemType> items, IList<IList<IList<int>>> indices, ArrayType result)
where ItemType : IList<ItemType2> where ItemType2 : IList<DistributionType> where DistributionType : SettableToUniform, SettableToProduct<DistributionType> where ArrayType : IList<DistributionType>, SettableToUniform
Parameters
| Type | Name | Description |
|---|---|---|
| IList<ItemType> | items | Incoming message from |
| IList<IList<IList<Int32>>> | indices | Incoming message from |
| ArrayType | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| ArrayType |
|
Type Parameters
| Name | Description |
|---|---|
| ItemType | The type of a sub-array. |
| ItemType2 | The type of a sub-sub-array. |
| DistributionType | The type of a distribution over array elements. |
| ArrayType | The type of the resulting array. |
Remarks
The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except array. Because the factor is deterministic, items is integrated out before taking the logarithm. The formula is exp(sum_(indices) p(indices) log(sum_items p(items) factor(items,array,indices))).
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|
AverageLogFactor(IList<IList<IList<T>>>, IList<T>, IList<IList<IList<Int32>>>)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(IList<IList<IList<T>>> items, IList<T> array, IList<IList<IList<int>>> indices)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<IList<IList<T>>> | items | Incoming message from |
| IList<T> | array | Incoming message from |
| IList<IList<IList<Int32>>> | indices | Incoming message from |
Returns
| Type | Description |
|---|---|
| Double | Zero. |
Remarks
In Variational Message Passing, the evidence contribution of a deterministic factor is zero. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
AverageLogFactor<DistributionType>(IList<IList<IList<T>>>, IList<DistributionType>)
Evidence message for VMP.
Declaration
public static double AverageLogFactor<DistributionType>(IList<IList<IList<T>>> items, IList<DistributionType> array)
where DistributionType : HasPoint<T>, CanGetLogProb<T>
Parameters
| Type | Name | Description |
|---|---|---|
| IList<IList<IList<T>>> | items | Incoming message from |
| IList<DistributionType> | array | Incoming message from |
Returns
| Type | Description |
|---|---|
| Double | Zero. |
Type Parameters
| Name | Description |
|---|---|
| DistributionType | The type of a distribution over array elements. |
Remarks
In Variational Message Passing, the evidence contribution of a deterministic factor is zero. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
AverageLogFactor<ItemType, ItemType2, DistributionType>(IList<ItemType>, IList<DistributionType>)
Evidence message for VMP.
Declaration
public static double AverageLogFactor<ItemType, ItemType2, DistributionType>(IList<ItemType> items, IList<DistributionType> array)
where ItemType : IList<ItemType2> where ItemType2 : IList<DistributionType> where DistributionType : SettableToProduct<DistributionType>, CanGetLogAverageOf<DistributionType>
Parameters
| Type | Name | Description |
|---|---|---|
| IList<ItemType> | items | Incoming message from |
| IList<DistributionType> | array | Incoming message from |
Returns
| Type | Description |
|---|---|
| Double | Zero. |
Type Parameters
| Name | Description |
|---|---|
| ItemType | The type of a sub-array. |
| ItemType2 | The type of a sub-sub-array. |
| DistributionType | The type of a distribution over array elements. |
Remarks
In Variational Message Passing, the evidence contribution of a deterministic factor is zero. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
AverageLogFactor<ItemType, ItemType2, DistributionType>(IList<ItemType>, IList<T>)
Declaration
public static double AverageLogFactor<ItemType, ItemType2, DistributionType>(IList<ItemType> items, IList<T> array)
where ItemType : IList<ItemType2> where ItemType2 : IList<DistributionType> where DistributionType : CanGetLogProb<T>
Parameters
| Type | Name | Description |
|---|---|---|
| IList<ItemType> | items | |
| IList<T> | array |
Returns
| Type | Description |
|---|---|
| Double |
Type Parameters
| Name | Description |
|---|---|
| ItemType | The type of a sub-array. |
| ItemType2 | The type of a sub-sub-array. |
| DistributionType | The type of a distribution over array elements. |
ItemsAverageConditional<ArrayType, ItemType, ItemType2, DistributionType>(ItemType, ArrayType, ArrayType, IList<IList<IList<Int32>>>, Int32, ItemType)
EP message to items.
Declaration
public static ItemType ItemsAverageConditional<ArrayType, ItemType, ItemType2, DistributionType>(ItemType items, ArrayType array, [SkipIfAllUniform] ArrayType marginal, IList<IList<IList<int>>> indices, int resultIndex, ItemType result)
where ArrayType : IList<DistributionType> where ItemType : IList<ItemType2> where ItemType2 : IList<DistributionType> where DistributionType : SettableToRatio<DistributionType>
Parameters
| Type | Name | Description |
|---|---|---|
| ItemType | items | Incoming message from |
| ArrayType | array | Incoming message from |
| ArrayType | marginal | Buffer |
| IList<IList<IList<Int32>>> | indices | Incoming message from |
| Int32 | resultIndex | Index of the |
| ItemType | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| ItemType |
|
Type Parameters
| Name | Description |
|---|---|
| ArrayType | The type of an array for the marginal. |
| ItemType | The type of a sub-array. |
| ItemType2 | The type of a sub-sub-array. |
| DistributionType | The type of a distribution over array elements. |
Remarks
The outgoing message is a distribution matching the moments of items as the random arguments are varied. The formula is proj[p(items) sum_(array,indices) p(array,indices) factor(items,array,indices)]/p(items).
ItemsAverageLogarithm<ItemType, ItemType2, DistributionType>(IList<DistributionType>, IList<IList<IList<Int32>>>, Int32, ItemType)
VMP message to items.
Declaration
public static ItemType ItemsAverageLogarithm<ItemType, ItemType2, DistributionType>([SkipIfAllUniform] IList<DistributionType> array, IList<IList<IList<int>>> indices, int resultIndex, ItemType result)
where ItemType : IList<ItemType2> where ItemType2 : IList<DistributionType> where DistributionType : SettableTo<DistributionType>
Parameters
| Type | Name | Description |
|---|---|---|
| IList<DistributionType> | array | Incoming message from |
| IList<IList<IList<Int32>>> | indices | Incoming message from |
| Int32 | resultIndex | Index of the |
| ItemType | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| ItemType |
|
Type Parameters
| Name | Description |
|---|---|
| ItemType | The type of a sub-array. |
| ItemType2 | The type of a sub-sub-array. |
| DistributionType | The type of a distribution over array elements. |
Remarks
The outgoing message is a distribution matching the moments of items as the random arguments are varied. The formula is proj[sum_(array,indices) p(array,indices) factor(items,array,indices)].
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|
LogAverageFactor(IList<IList<IList<T>>>, IList<T>, IList<IList<IList<Int32>>>)
Evidence message for EP.
Declaration
public static double LogAverageFactor(IList<IList<IList<T>>> items, IList<T> array, IList<IList<IList<int>>> indices)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<IList<IList<T>>> | items | Incoming message from |
| IList<T> | array | Incoming message from |
| IList<IList<IList<Int32>>> | indices | Incoming message from |
Returns
| Type | Description |
|---|---|
| Double | Logarithm of the factor's average value across the given argument distributions. |
Remarks
The formula for the result is log(sum_(items,array,indices) p(items,array,indices) factor(items,array,indices)).
LogAverageFactor<DistributionType>(IList<IList<IList<T>>>, IList<DistributionType>, IList<IList<IList<Int32>>>)
Evidence message for EP.
Declaration
public static double LogAverageFactor<DistributionType>(IList<IList<IList<T>>> items, IList<DistributionType> array, IList<IList<IList<int>>> indices)
where DistributionType : HasPoint<T>, CanGetLogProb<T>
Parameters
| Type | Name | Description |
|---|---|---|
| IList<IList<IList<T>>> | items | Incoming message from |
| IList<DistributionType> | array | Incoming message from |
| IList<IList<IList<Int32>>> | indices | Incoming message from |
Returns
| Type | Description |
|---|---|
| Double | Logarithm of the factor's average value across the given argument distributions. |
Type Parameters
| Name | Description |
|---|---|
| DistributionType | The type of a distribution over array elements. |
Remarks
The formula for the result is log(sum_(items,array,indices) p(items,array,indices) factor(items,array,indices)).
LogAverageFactor<ItemType, ItemType2, DistributionType>(IList<ItemType>, IList<DistributionType>, IList<IList<IList<Int32>>>)
Declaration
public static double LogAverageFactor<ItemType, ItemType2, DistributionType>(IList<ItemType> items, IList<DistributionType> array, IList<IList<IList<int>>> indices)
where ItemType : IList<ItemType2> where ItemType2 : IList<DistributionType> where DistributionType : IDistribution<T>, SettableToProduct<DistributionType>, CanGetLogAverageOf<DistributionType>
Parameters
| Type | Name | Description |
|---|---|---|
| IList<ItemType> | items | |
| IList<DistributionType> | array | |
| IList<IList<IList<Int32>>> | indices |
Returns
| Type | Description |
|---|---|
| Double |
Type Parameters
| Name | Description |
|---|---|
| ItemType | The type of a sub-array. |
| ItemType2 | The type of a sub-sub-array. |
| DistributionType | The type of a distribution over array elements. |
LogAverageFactor<ItemType, ItemType2, DistributionType>(IList<ItemType>, IList<T>, IList<IList<IList<Int32>>>)
Evidence message for EP.
Declaration
public static double LogAverageFactor<ItemType, ItemType2, DistributionType>(IList<ItemType> items, IList<T> array, IList<IList<IList<int>>> indices)
where ItemType : IList<ItemType2> where ItemType2 : IList<DistributionType> where DistributionType : CanGetLogProb<T>
Parameters
| Type | Name | Description |
|---|---|---|
| IList<ItemType> | items | Incoming message from |
| IList<T> | array | Incoming message from |
| IList<IList<IList<Int32>>> | indices | Incoming message from |
Returns
| Type | Description |
|---|---|
| Double | Logarithm of the factor's average value across the given argument distributions. |
Type Parameters
| Name | Description |
|---|---|
| ItemType | The type of a sub-array. |
| ItemType2 | The type of a sub-sub-array. |
| DistributionType | The type of a distribution over array elements. |
Remarks
The formula for the result is log(sum_(items,array,indices) p(items,array,indices) factor(items,array,indices)).
LogEvidenceRatio(IList<IList<IList<T>>>, IList<T>, IList<IList<IList<Int32>>>)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(IList<IList<IList<T>>> items, IList<T> array, IList<IList<IList<int>>> indices)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<IList<IList<T>>> | items | Incoming message from |
| IList<T> | array | Incoming message from |
| IList<IList<IList<Int32>>> | indices | Incoming message from |
Returns
| Type | Description |
|---|---|
| Double | Logarithm of the factor's contribution the EP model evidence. |
Remarks
The formula for the result is log(sum_(items,array,indices) p(items,array,indices) factor(items,array,indices) / sum_items p(items) messageTo(items)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio<DistributionType>(IList<IList<IList<T>>>, IList<DistributionType>, IList<IList<IList<Int32>>>)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio<DistributionType>(IList<IList<IList<T>>> items, IList<DistributionType> array, IList<IList<IList<int>>> indices)
where DistributionType : HasPoint<T>, CanGetLogProb<T>
Parameters
| Type | Name | Description |
|---|---|---|
| IList<IList<IList<T>>> | items | Incoming message from |
| IList<DistributionType> | array | Incoming message from |
| IList<IList<IList<Int32>>> | indices | Incoming message from |
Returns
| Type | Description |
|---|---|
| Double | Logarithm of the factor's contribution the EP model evidence. |
Type Parameters
| Name | Description |
|---|---|
| DistributionType | The type of a distribution over array elements. |
Remarks
The formula for the result is log(sum_(items,array,indices) p(items,array,indices) factor(items,array,indices) / sum_items p(items) messageTo(items)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio<ItemType, ItemType2, DistributionType>(IList<ItemType>, IList<DistributionType>, IList<IList<IList<Int32>>>, IList<ItemType>)
Declaration
public static double LogEvidenceRatio<ItemType, ItemType2, DistributionType>(IList<ItemType> items, IList<DistributionType> array, IList<IList<IList<int>>> indices, IList<ItemType> to_items)
where ItemType : IList<ItemType2> where ItemType2 : IList<DistributionType> where DistributionType : SettableToUniform, SettableToProduct<DistributionType>, CanGetLogAverageOf<DistributionType>, ICloneable
Parameters
| Type | Name | Description |
|---|---|---|
| IList<ItemType> | items | |
| IList<DistributionType> | array | |
| IList<IList<IList<Int32>>> | indices | |
| IList<ItemType> | to_items |
Returns
| Type | Description |
|---|---|
| Double |
Type Parameters
| Name | Description |
|---|---|
| ItemType | The type of a sub-array. |
| ItemType2 | The type of a sub-sub-array. |
| DistributionType | The type of a distribution over array elements. |
LogEvidenceRatio<ItemType, ItemType2, DistributionType>(IList<ItemType>, IList<T>, IList<IList<IList<Int32>>>)
Declaration
public static double LogEvidenceRatio<ItemType, ItemType2, DistributionType>(IList<ItemType> items, IList<T> array, IList<IList<IList<int>>> indices)
where ItemType : IList<ItemType2> where ItemType2 : IList<DistributionType> where DistributionType : CanGetLogProb<T>
Parameters
| Type | Name | Description |
|---|---|---|
| IList<ItemType> | items | |
| IList<T> | array | |
| IList<IList<IList<Int32>>> | indices |
Returns
| Type | Description |
|---|---|
| Double |
Type Parameters
| Name | Description |
|---|---|
| ItemType | The type of a sub-array. |
| ItemType2 | The type of a sub-sub-array. |
| DistributionType | The type of a distribution over array elements. |
Marginal<ArrayType, DistributionType>(ArrayType, ArrayType, ArrayType)
Declaration
[SkipIfAllUniform(new string[]{"array", "to_array"})]
public static ArrayType Marginal<ArrayType, DistributionType>(ArrayType array, ArrayType to_array, ArrayType result)
where ArrayType : IList<DistributionType>, SettableTo<ArrayType> where DistributionType : SettableToProduct<DistributionType>
Parameters
| Type | Name | Description |
|---|---|---|
| ArrayType | array | |
| ArrayType | to_array | |
| ArrayType | result |
Returns
| Type | Description |
|---|---|
| ArrayType |
Type Parameters
| Name | Description |
|---|---|
| ArrayType | The type of an array for the marginal. |
| DistributionType | The type of a distribution over array elements. |
MarginalIncrement<ArrayType, ItemType, ItemType2, DistributionType>(ArrayType, ItemType, ItemType, IList<IList<IList<Int32>>>, Int32)
Declaration
public static ArrayType MarginalIncrement<ArrayType, ItemType, ItemType2, DistributionType>(ArrayType result, ItemType to_item, ItemType item, IList<IList<IList<int>>> indices, int resultIndex)
where ArrayType : IList<DistributionType>, SettableTo<ArrayType> where ItemType : IList<ItemType2> where ItemType2 : IList<DistributionType> where DistributionType : SettableToProduct<DistributionType>
Parameters
| Type | Name | Description |
|---|---|---|
| ArrayType | result | Modified to contain the outgoing message. |
| ItemType | to_item | |
| ItemType | item | |
| IList<IList<IList<Int32>>> | indices | Incoming message from |
| Int32 | resultIndex | Index of the |
Returns
| Type | Description |
|---|---|
| ArrayType |
|
Type Parameters
| Name | Description |
|---|---|
| ArrayType | The type of an array for the marginal. |
| ItemType | The type of a sub-array. |
| ItemType2 | The type of a sub-sub-array. |
| DistributionType | The type of a distribution over array elements. |
Remarks
MarginalInit<ArrayType>(ArrayType)
Initialize the buffer marginal.
Declaration
public static ArrayType MarginalInit<ArrayType>(ArrayType array)
where ArrayType : ICloneable
Parameters
| Type | Name | Description |
|---|---|---|
| ArrayType | array | Incoming message from |
Returns
| Type | Description |
|---|---|
| ArrayType | Initial value of buffer |
Type Parameters
| Name | Description |
|---|---|
| ArrayType | The type of an array for the marginal. |
Remarks
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|