public class Binomial extends java.lang.Object implements DiscreteDistribution
Modifier and Type | Method and Description |
---|---|
DoubleTensor |
logProb(IntegerTensor k) |
static DoubleVertex |
logProbOutput(LogProbGraph.IntegerPlaceholderVertex k,
LogProbGraph.DoublePlaceholderVertex p,
LogProbGraph.IntegerPlaceholderVertex n) |
IntegerTensor |
sample(long[] shape,
KeanuRandom random) |
static DiscreteDistribution |
withParameters(DoubleTensor p,
IntegerTensor n) |
public static DiscreteDistribution withParameters(DoubleTensor p, IntegerTensor n)
public IntegerTensor sample(long[] shape, KeanuRandom random)
sample
in interface Distribution<IntegerTensor>
public DoubleTensor logProb(IntegerTensor k)
logProb
in interface Distribution<IntegerTensor>
public static DoubleVertex logProbOutput(LogProbGraph.IntegerPlaceholderVertex k, LogProbGraph.DoublePlaceholderVertex p, LogProbGraph.IntegerPlaceholderVertex n)