public class PoissonVertex extends ProbabilisticInteger
ID_GENERATOR
Constructor and Description |
---|
PoissonVertex(double mu) |
PoissonVertex(DoubleVertex mu)
One to one constructor for mapping some shape of mu to
a matching shaped Poisson.
|
PoissonVertex(int[] shape,
double mu) |
PoissonVertex(int[] shape,
DoubleVertex mu)
One mu that must match a proposed tensor shape of Poisson.
|
PoissonVertex(Vertex<? extends NumberTensor> mu) |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.Long,DoubleTensor> |
dLogPmf(IntegerTensor value) |
Vertex<DoubleTensor> |
getMu() |
double |
logPmf(IntegerTensor value) |
IntegerTensor |
sample(KeanuRandom random) |
isProbabilistic, updateValue
abs, div, div, divideBy, divideBy, divideBy, dLogPmf, dLogPmf, getValue, lambda, lambda, logPmf, logPmf, minus, minus, minus, multiply, multiply, multiply, observe, observe, pluck, plus, plus, plus, setAndCascade, setAndCascade, setValue, setValue, slice, sum, times, times, unaryMinus
dLogProb, logProb
addChild, addParent, addParents, dLogProbAtValue, equals, eval, getChildren, getConnectedGraph, getId, getParents, getRawValue, getShape, getValue, hashCode, hasValue, isObserved, lazyEval, logProbAtValue, observe, observeOwnValue, sample, setAndCascade, setParents, setParents, setValue, unobserve
public PoissonVertex(int[] shape, DoubleVertex mu)
shape
- the desired shape of the vertexmu
- the mu of the Poisson with either the same shape as specified for this vertex or a scalarpublic PoissonVertex(int[] shape, double mu)
public PoissonVertex(DoubleVertex mu)
mu
- mu with same shape as desired Poisson tensor or scalarpublic PoissonVertex(Vertex<? extends NumberTensor> mu)
public PoissonVertex(double mu)
public Vertex<DoubleTensor> getMu()
public double logPmf(IntegerTensor value)
logPmf
in class DiscreteVertex<IntegerTensor>
public java.util.Map<java.lang.Long,DoubleTensor> dLogPmf(IntegerTensor value)
dLogPmf
in class DiscreteVertex<IntegerTensor>
public IntegerTensor sample(KeanuRandom random)
sample
in class Vertex<IntegerTensor>
random
- source of randomness