public class HalfGaussianVertex extends GaussianVertex
MU_NAME, SIGMA_NAME
Constructor and Description |
---|
HalfGaussianVertex(double sigma) |
HalfGaussianVertex(DoubleVertex sigma) |
HalfGaussianVertex(long[] tensorShape,
double sigma) |
HalfGaussianVertex(long[] tensorShape,
DoubleVertex sigma)
One sigma that matches a proposed tensor shape of HalfGaussian (a Gaussian with mu = 0 and non-negative x).
|
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 |
sampleWithShape(long[] shape,
KeanuRandom random) |
getMu, getSigma, logProbGraph
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, 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 HalfGaussianVertex(long[] tensorShape, DoubleVertex sigma)
If provided parameter is scalar then the proposed shape determines the shape
tensorShape
- the desired shape of the tensor in this vertexsigma
- the sigma of the HalfGaussian with either the same tensorShape as specified for this vertex or a scalarpublic HalfGaussianVertex(DoubleVertex sigma)
public HalfGaussianVertex(double sigma)
public HalfGaussianVertex(long[] tensorShape, double sigma)
public double logProb(DoubleTensor value)
Probabilistic
logProb
in interface Probabilistic<DoubleTensor>
logProb
in class GaussianVertex
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>
dLogProb
in class GaussianVertex
value
- at a given valuewithRespectTo
- list of parents to differentiate with respect topublic DoubleTensor sampleWithShape(long[] shape, KeanuRandom random)
sampleWithShape
in interface SamplableWithShape<DoubleTensor>
sampleWithShape
in class GaussianVertex