Infer.NET Documentation
DiscreteFromLogProbs Method (logProbs)
Infer.NET code documentationMicrosoftResearch.Infer.ModelsVariableDiscreteFromLogProbs(VariableArray<(Of <(Double>)>))
Microsoft Research, Cambridge
Creates a random int variable x where p(x=k) is proportional to exp(logProbs[k]), i.e. the softmax function of the logProbs.
Declaration Syntax
C#Visual BasicVisual C++
public static Variable<int> DiscreteFromLogProbs(
	VariableArray<double> logProbs
)
Public Shared Function DiscreteFromLogProbs ( _
	logProbs As VariableArray(Of Double) _
) As Variable(Of Integer)
public:
static Variable<int>^ DiscreteFromLogProbs(
	VariableArray<double>^ logProbs
)
Parameters
logProbs (VariableArray<(Of <(Double>)>))
Arguments to the softmax.
Return Value
An integer random variable

Assembly: Infer.Compiler (Module: Infer.Compiler) Version: 2.3.41111.0 (2.3.41111.0)