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