public class Multinomial extends java.lang.Object implements DiscreteDistribution
Modifier and Type | Field and Description |
---|---|
static DebugTensorValidator |
CATEGORY_PROBABILITIES_CANNOT_BE_ZERO |
Modifier and Type | Method and Description |
---|---|
DoubleTensor |
logProb(IntegerTensor k) |
IntegerTensor |
sample(long[] shape,
KeanuRandom random) |
static Multinomial |
withParameters(IntegerTensor n,
DoubleTensor p) |
public static final DebugTensorValidator CATEGORY_PROBABILITIES_CANNOT_BE_ZERO
public static Multinomial withParameters(IntegerTensor n, DoubleTensor p)
public IntegerTensor sample(long[] shape, KeanuRandom random)
sample
in interface Distribution<IntegerTensor>
public DoubleTensor logProb(IntegerTensor k)
logProb
in interface Distribution<IntegerTensor>