Class GetItemsOp2<T>
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(typeof(Collection), "GetItems<>", new Type[]{}, Default = false)]
[Buffers(new string[]{"partial"})]
[Quality(QualityBand.Mature)]
public static class GetItemsOp2<T>
Type Parameters
Name | Description |
---|---|
T | The type of a list element. |
Methods
ArrayIncrement<DistributionType>(DistributionType, DistributionType, DistributionType)
Declaration
public static DistributionType ArrayIncrement<DistributionType>(DistributionType partial, DistributionType item, DistributionType result)
where DistributionType : SettableToProduct<DistributionType>
Parameters
Type | Name | Description |
---|---|---|
DistributionType | partial | Buffer |
DistributionType | item | |
DistributionType | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
DistributionType |
|
Type Parameters
Name | Description |
---|---|
DistributionType | The type of a distribution over array elements. |
Remarks
ItemsAverageConditional<DistributionType>(DistributionType, IReadOnlyList<DistributionType>, IReadOnlyList<Int32>, Int32, DistributionType)
EP message to items
.
Declaration
public static DistributionType ItemsAverageConditional<DistributionType>(DistributionType partial, [SkipIfAllUniform] IReadOnlyList<DistributionType> array, IReadOnlyList<int> indices, int resultIndex, DistributionType result)
where DistributionType : SettableToProduct<DistributionType>, SettableToRatio<DistributionType>
Parameters
Type | Name | Description |
---|---|---|
DistributionType | partial | Buffer |
IReadOnlyList<DistributionType> | array | Incoming message from |
IReadOnlyList<Int32> | indices | Constant value for |
Int32 | resultIndex | Index of the |
DistributionType | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
DistributionType |
|
Type Parameters
Name | Description |
---|---|
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) p(array) factor(items,array,indices)]/p(items)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ItemsAverageConditional2<DistributionType>(DistributionType, IReadOnlyList<DistributionType>, IReadOnlyList<DistributionType>, IReadOnlyList<Int32>, Int32, DistributionType)
Declaration
public static DistributionType ItemsAverageConditional2<DistributionType>(DistributionType items, [SkipIfAllUniform] IReadOnlyList<DistributionType> array, IReadOnlyList<DistributionType> to_array, IReadOnlyList<int> indices, int resultIndex, DistributionType result)
where DistributionType : SettableToProduct<DistributionType>, SettableToRatio<DistributionType>
Parameters
Type | Name | Description |
---|---|---|
DistributionType | items | |
IReadOnlyList<DistributionType> | array | |
IReadOnlyList<DistributionType> | to_array | |
IReadOnlyList<Int32> | indices | |
Int32 | resultIndex | |
DistributionType | result |
Returns
Type | Description |
---|---|
DistributionType |
Type Parameters
Name | Description |
---|---|
DistributionType | The type of a distribution over array elements. |
ItemsAverageConditionalInit<TDist>(DistributionRefArray<TDist, T>, IReadOnlyList<Int32>)
Declaration
public static DistributionRefArray<TDist, T> ItemsAverageConditionalInit<TDist>(DistributionRefArray<TDist, T> array, IReadOnlyList<int> indices)
where TDist : class, SettableTo<TDist>, SettableToProduct<TDist>, SettableToRatio<TDist>, SettableToPower<TDist>, SettableToWeightedSum<TDist>, CanGetLogAverageOf<TDist>, CanGetLogAverageOfPower<TDist>, CanGetAverageLog<TDist>, IDistribution<T>, Sampleable<T>
Parameters
Type | Name | Description |
---|---|---|
DistributionRefArray<TDist, T> | array | Incoming message from |
IReadOnlyList<Int32> | indices | Constant value for |
Returns
Type | Description |
---|---|
DistributionRefArray<TDist, T> |
Type Parameters
Name | Description |
---|---|
TDist | The type of a distribution over array elements. |
Remarks
ItemsAverageConditionalInit<TDist>(DistributionStructArray<TDist, T>, IReadOnlyList<Int32>)
Declaration
public static DistributionStructArray<TDist, T> ItemsAverageConditionalInit<TDist>(DistributionStructArray<TDist, T> array, IReadOnlyList<int> indices)
where TDist : struct, SettableToProduct<TDist>, SettableToRatio<TDist>, SettableToPower<TDist>, SettableToWeightedSum<TDist>, CanGetLogAverageOf<TDist>, CanGetLogAverageOfPower<TDist>, CanGetAverageLog<TDist>, IDistribution<T>, Sampleable<T>
Parameters
Type | Name | Description |
---|---|---|
DistributionStructArray<TDist, T> | array | Incoming message from |
IReadOnlyList<Int32> | indices | Constant value for |
Returns
Type | Description |
---|---|
DistributionStructArray<TDist, T> |
Type Parameters
Name | Description |
---|---|
TDist | The type of a distribution over array elements. |
Remarks
Partial<DistributionType>(DistributionType, IReadOnlyList<DistributionType>, IReadOnlyList<Int32>, Int32, DistributionType)
Update the buffer partial
.
Declaration
public static DistributionType Partial<DistributionType>(DistributionType items, IReadOnlyList<DistributionType> to_array, IReadOnlyList<int> indices, int resultIndex, DistributionType result)
where DistributionType : SettableToProduct<DistributionType>, SettableToRatio<DistributionType>
Parameters
Type | Name | Description |
---|---|---|
DistributionType | items | Incoming message from |
IReadOnlyList<DistributionType> | to_array | Outgoing message to |
IReadOnlyList<Int32> | indices | Constant value for |
Int32 | resultIndex | Index of the |
DistributionType | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
DistributionType |
|
Type Parameters
Name | Description |
---|---|
DistributionType | The type of a distribution over array elements. |
Remarks
PartialInit<ArrayType>(ArrayType)
Initialize the buffer partial
.
Declaration
public static ArrayType PartialInit<ArrayType>(ArrayType items)
where ArrayType : ICloneable, SettableToUniform
Parameters
Type | Name | Description |
---|---|---|
ArrayType | items | Incoming message from |
Returns
Type | Description |
---|---|
ArrayType | Initial value of buffer |
Type Parameters
Name | Description |
---|---|
ArrayType | The type of a distribution array. |
Remarks