public class Categorical<T> extends java.lang.Object implements Distribution<T>
Modifier and Type | Method and Description |
---|---|
DoubleTensor |
logProb(T x) |
T |
sample(long[] shape,
KeanuRandom random) |
static <T> Categorical<T> |
withParameters(java.util.Map<T,DoubleTensor> selectableValues) |
public static <T> Categorical<T> withParameters(java.util.Map<T,DoubleTensor> selectableValues)
public T sample(long[] shape, KeanuRandom random)
sample
in interface Distribution<T>
public DoubleTensor logProb(T x)
logProb
in interface Distribution<T>