Infer.NET Documentation
Discrete Method (valueRange, probs)
Infer.NET code documentationMicrosoftResearch.Infer.ModelsVariableDiscrete(Range, array<Double>[]()[])
Microsoft Research, Cambridge
Creates a discrete random variable with the specified probabilities of having value 0,1,...,(probs.Length-1).
Declaration Syntax
C#Visual BasicVisual C++
public static Variable<int> Discrete(
	Range valueRange,
	params double[] probs
)
Public Shared Function Discrete ( _
	valueRange As Range, _
	ParamArray probs As Double() _
) As Variable(Of Integer)
public:
static Variable<int>^ Discrete(
	Range^ valueRange, 
	... array<double>^ probs
)
Parameters
valueRange (Range)
A range defining the possible values for the variable.
probs (array< Double >[]()[])
The set of probabilities of having each value. Must add up to one.
Return Value
Discrete random variable

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