public class PoissonVertex extends IntegerVertex implements ProbabilisticInteger
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<Vertex,DoubleTensor> |
dLogProb(IntegerTensor value,
java.util.Set<? extends Vertex> withRespectTo)
The partial derivatives of the natural log prob.
|
Vertex<DoubleTensor> |
getMu() |
double |
logProb(IntegerTensor value)
This is the natural log of the probability at the supplied value.
|
IntegerTensor |
sample(KeanuRandom random) |
abs, concat, div, div, divideBy, divideBy, divideBy, equalTo, getValue, greaterThan, greaterThanOrEqualTo, lambda, lambda, lessThan, lessThanOrEqualTo, minus, minus, minus, multiply, multiply, multiply, notEqualTo, observe, observe, plus, plus, plus, pow, pow, reshape, setAndCascade, setAndCascade, setValue, setValue, slice, sum, take, times, times, unaryMinus
addChild, addParent, addParents, equals, eval, getChildren, getConnectedGraph, getId, getIndentation, getLabel, getObservedValue, getParents, getRawValue, getShape, getValue, hashCode, hasValue, isObserved, isProbabilistic, labeledAs, lazyEval, observe, observeOwnValue, sample, setAndCascade, setLabel, setParents, setParents, setValue, toString, unobserve
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
dLogPmf, dLogPmf, dLogPmf, logPmf, logPmf, logPmf
dLogProb, dLogProbAtValue, dLogProbAtValue, getValue, keepOnlyProbabilisticVertices, logProbAtValue, setValue
getObservedValue, isObserved, observableTypeFor, observe, unobserve
public PoissonVertex(int[] shape, DoubleVertex mu)
If all provided parameters are scalar then the proposed shape determines the shape
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 logProb(IntegerTensor value)
Probabilistic
logProb
in interface Probabilistic<IntegerTensor>
value
- The supplied value.public java.util.Map<Vertex,DoubleTensor> dLogProb(IntegerTensor value, java.util.Set<? extends Vertex> withRespectTo)
Probabilistic
dLogProb
in interface Probabilistic<IntegerTensor>
value
- at a given valuewithRespectTo
- list of parents to differentiate with respect topublic IntegerTensor sample(KeanuRandom random)
sample
in class Vertex<IntegerTensor>
random
- source of randomness