public class GammaVertex extends DoubleVertex implements ProbabilisticDouble
Constructor and Description |
---|
GammaVertex(double theta,
double k) |
GammaVertex(double theta,
DoubleVertex k) |
GammaVertex(DoubleVertex theta,
double k) |
GammaVertex(DoubleVertex theta,
DoubleVertex k)
One to one constructor for mapping some shape of theta and k to matching shaped gamma.
|
GammaVertex(int[] tensorShape,
DoubleVertex theta,
DoubleVertex k)
Theta or k or both driving an arbitrarily shaped tensor of Gamma
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<Vertex,DoubleTensor> |
dLogProb(DoubleTensor value,
java.util.Set<? extends Vertex> withRespectTo)
The partial derivatives of the natural log prob.
|
double |
logProb(DoubleTensor value)
This is the natural log of the probability at the supplied value.
|
DoubleTensor |
sample(KeanuRandom random) |
abs, acos, asin, atan, atan2, calculateDualNumber, ceil, concat, cos, div, div, divideBy, divideBy, equalTo, exp, floor, getValue, greaterThan, greaterThanOrEqualTo, lambda, lambda, lessThan, lessThanOrEqualTo, log, matrixInverse, matrixMultiply, minus, minus, multiply, multiply, notEqualTo, observe, observe, plus, plus, pow, pow, reshape, reverseModeAutoDifferentiation, round, setAndCascade, setAndCascade, setValue, setValue, sigmoid, sin, slice, sum, take, tan, 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
dLogPdf, dLogPdf, dLogPdf, dLogPdf, dLogPdf, dLogPdf, logPdf, logPdf, logPdf
dLogProb, dLogProbAtValue, dLogProbAtValue, getValue, keepOnlyProbabilisticVertices, logProbAtValue, setValue
getObservedValue, isObserved, observableTypeFor, observe, unobserve
getDualNumber
public GammaVertex(int[] tensorShape, DoubleVertex theta, DoubleVertex k)
If all provided parameters are scalar then the proposed shape determines the shape
tensorShape
- the desired shape of the vertextheta
- the theta (scale) of the Gamma with either the same shape as specified for this vertexk
- the k (shape) of the Gamma with either the same shape as specified for this vertexpublic GammaVertex(DoubleVertex theta, DoubleVertex k)
theta
- the theta (scale) of the Gamma with either the same shape as specified for this vertexk
- the k (shape) of the Gamma with either the same shape as specified for this vertexpublic GammaVertex(DoubleVertex theta, double k)
public GammaVertex(double theta, DoubleVertex k)
public GammaVertex(double theta, double k)
public double logProb(DoubleTensor value)
Probabilistic
logProb
in interface Probabilistic<DoubleTensor>
value
- The supplied value.public java.util.Map<Vertex,DoubleTensor> dLogProb(DoubleTensor value, java.util.Set<? extends Vertex> withRespectTo)
Probabilistic
dLogProb
in interface Probabilistic<DoubleTensor>
value
- at a given valuewithRespectTo
- list of parents to differentiate with respect topublic DoubleTensor sample(KeanuRandom random)
sample
in class Vertex<DoubleTensor>
random
- source of randomness