public class InverseGammaVertex extends DoubleVertex implements Differentiable, ProbabilisticDouble, SamplableWithManyScalars<DoubleTensor>, LogProbGraphSupplier
Constructor and Description |
---|
InverseGammaVertex(double alpha,
double beta) |
InverseGammaVertex(double alpha,
DoubleVertex beta) |
InverseGammaVertex(DoubleVertex alpha,
double beta) |
InverseGammaVertex(DoubleVertex alpha,
DoubleVertex beta)
One to one constructor for mapping some shape of alpha and beta to
alpha matching shaped Inverse Gamma.
|
InverseGammaVertex(long[] tensorShape,
double alpha,
double beta) |
InverseGammaVertex(long[] tensorShape,
double alpha,
DoubleVertex beta) |
InverseGammaVertex(long[] tensorShape,
DoubleVertex alpha,
double beta) |
InverseGammaVertex(long[] tensorShape,
DoubleVertex alpha,
DoubleVertex beta)
One alpha or beta or both driving an arbitrarily shaped tensor of Inverse 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.
|
DoubleVertex |
getAlpha() |
DoubleVertex |
getBeta() |
double |
logProb(DoubleTensor value)
This is the natural log of the probability at the supplied value.
|
LogProbGraph |
logProbGraph() |
DoubleTensor |
sampleWithShape(long[] shape,
KeanuRandom random) |
abs, acos, asin, atan, atan2, ceil, concat, cos, div, div, divideBy, divideBy, equalTo, exp, floor, getValue, greaterThan, greaterThanOrEqualTo, lambda, lambda, lessThan, lessThanOrEqualTo, loadValue, log, logGamma, matrixDeterminant, matrixInverse, matrixMultiply, max, min, minus, minus, multiply, multiply, notEqualTo, observe, observe, permute, plus, plus, pow, pow, reshape, reverseDiv, reverseMinus, round, saveValue, setAndCascade, setAndCascade, setValue, setValue, setWithMask, setWithMask, sigmoid, sin, slice, sum, sum, take, tan, times, times, toGreaterThanMask, toGreaterThanMask, toGreaterThanOrEqualToMask, toGreaterThanOrEqualToMask, toInteger, toLessThanMask, toLessThanMask, toLessThanOrEqualToMask, toLessThanOrEqualToMask, transpose, unaryMinus
addChild, addParent, addParents, equals, eval, getChildren, getConnectedGraph, getDegree, getId, getIndentation, getLabel, getObservedValue, getParents, getRank, getReference, getShape, getState, getValue, hashCode, hasValue, isDifferentiable, isObserved, isProbabilistic, lazyEval, observe, observeOwnValue, print, print, removeLabel, save, setAndCascade, setLabel, setLabel, setParents, setParents, setState, setValue, toString, unobserve
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forwardModeAutoDifferentiation, reverseModeAutoDifferentiation, withRespectToSelf
dLogPdf, dLogPdf, dLogPdf, dLogPdf, dLogPdf, dLogPdf, logPdf, logPdf, logPdf
dLogProb, dLogProbAtValue, dLogProbAtValue, getValue, keepOnlyProbabilisticVertices, logProbAtValue
getObservedValue, isObserved, observe, unobserve
sample, sampleManyScalars, sampleManyScalars
sampleWithShape
public InverseGammaVertex(long[] tensorShape, DoubleVertex alpha, DoubleVertex beta)
If all provided parameters are scalar then the proposed shape determines the shape
tensorShape
- the desired shape of the vertexalpha
- the alpha of the Inverse Gamma with either the same shape as specified for this vertex or alpha scalarbeta
- the beta of the Inverse Gamma with either the same shape as specified for this vertex or alpha scalarpublic InverseGammaVertex(DoubleVertex alpha, DoubleVertex beta)
alpha
- the alpha of the Inverse Gamma with either the same shape as specified for this vertex or alpha scalarbeta
- the beta of the Inverse Gamma with either the same shape as specified for this vertex or alpha scalarpublic InverseGammaVertex(DoubleVertex alpha, double beta)
public InverseGammaVertex(double alpha, DoubleVertex beta)
public InverseGammaVertex(double alpha, double beta)
public InverseGammaVertex(long[] tensorShape, DoubleVertex alpha, double beta)
public InverseGammaVertex(long[] tensorShape, double alpha, DoubleVertex beta)
public InverseGammaVertex(long[] tensorShape, double alpha, double beta)
public DoubleVertex getAlpha()
public DoubleVertex getBeta()
public double logProb(DoubleTensor value)
Probabilistic
logProb
in interface Probabilistic<DoubleTensor>
value
- The supplied value.public LogProbGraph logProbGraph()
logProbGraph
in interface LogProbGraphSupplier
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 sampleWithShape(long[] shape, KeanuRandom random)
sampleWithShape
in interface SamplableWithShape<DoubleTensor>