public class HalfCauchyVertex extends CauchyVertex
SCALE_NAME
SCALAR_SHAPE
Constructor and Description |
---|
HalfCauchyVertex(double scale) |
HalfCauchyVertex(long[] tensorShape,
double scale) |
HalfCauchyVertex(long[] tensorShape,
Vertex<DoubleTensor,?> scale)
One scale that matches a proposed tensor shape of HalfCauchy (Cauchy with location = 0 and non-negative x)
|
HalfCauchyVertex(Vertex<DoubleTensor,?> scale) |
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.
|
LogProbGraph |
logProbGraph() |
DoubleTensor |
sampleWithShape(long[] shape,
KeanuRandom random) |
getLocation, getScale
addChild, addParent, addParents, equals, eval, getChildren, getConnectedGraph, getDegree, getId, getIndentation, getLabel, getLength, getObservedValue, getParents, getRank, getReference, getShape, getState, getStride, getValue, hashCode, hasValue, isDifferentiable, isObserved, isProbabilistic, lazyEval, observe, observeOwnValue, print, print, removeLabel, setAndCascade, setLabel, setLabel, setParents, setParents, setState, setValue, toString, unobserve
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
acos, asin, atan2, concat, cos, div, div, divideBy, divideBy, divideBy, exp, getValue, greaterThanMask, greaterThanOrEqualToMask, lambda, lambda, lessThanMask, lessThanOrEqualToMask, log, max, min, minus, minus, multiply, multiply, multiply, observe, observe, ofType, plus, plus, pow, reciprocal, reverseDiv, reverseDiv, reverseMinus, reverseMinus, setAndCascade, setAndCascade, setValue, setValue, sin, sqrt, times, times, unaryMinus, wrap
acosh, asinh, atan, atan2, atanh, ceil, choleskyDecomposition, choleskyInverse, cosh, digamma, exp2, expM1, floor, isFinite, isInfinite, isNaN, isNegativeInfinity, isPositiveInfinity, log10, log1p, log2, logAddExp, logAddExp2, logGamma, matrixDeterminant, matrixInverse, mean, mean, nanArgMax, nanArgMax, nanArgMin, nanArgMin, notNaN, replaceNaN, round, safeLogTimes, sigmoid, sinh, standardDeviation, standardize, tan, tanh, trigamma
abs, apply, argMax, argMax, argMin, argMin, clamp, cumProd, cumSum, div, equalsWithinEpsilon, greaterThan, greaterThan, greaterThanMask, greaterThanOrEqual, greaterThanOrEqual, greaterThanOrEqualToMask, lessThan, lessThan, lessThanMask, lessThanOrEqual, lessThanOrEqual, lessThanOrEqualToMask, matrixMultiply, max, max, min, min, minus, plus, pow, pow, product, product, reverseDiv, reverseMinus, setWithMask, setWithMask, sign, sum, sum, tensorMultiply, times, toBoolean, toDouble, toInteger
broadcast, diag, diagPart, elementwiseEquals, elementwiseEquals, fillTriangular, get, notEqualTo, notEqualTo, permute, reshape, slice, slice, take, trianglePart, triLower, triUpper, where
addChild, addParent, addParents, eval, getChildren, getConnectedGraph, getDegree, getId, getIndentation, getLabel, getLength, getObservedValue, getParents, getRank, getReference, getShape, getState, getStride, getValue, hasValue, isDifferentiable, isObserved, isProbabilistic, lazyEval, observe, observeOwnValue, print, print, removeLabel, setAndCascade, setLabel, setLabel, setParents, setParents, setState, setValue, unobserve
matrixMultiply
expandDims, getLength, getRank, getShape, getStride, isLengthOne, isMatrix, isScalar, isVector, moveAxis, slice, sliceAlongDimension, squeeze, swapAxis, transpose
forwardModeAutoDifferentiation, ofSelfWrtSelf, reverseModeAutoDifferentiation, wrtSelfOfSelf
dLogPdf, dLogPdf, dLogPdf, dLogPdf, dLogPdf, dLogPdf, logPdf, logPdf, logPdf
dLogProb, dLogProbAtValue, dLogProbAtValue, getValue, logProbAtValue
sample, sampleManyScalars, sampleManyScalars
sampleWithShape
public HalfCauchyVertex(long[] tensorShape, Vertex<DoubleTensor,?> scale)
If provided parameter is scalar then the proposed shape determines the shape
tensorShape
- the desired shape of the tensor in this vertexscale
- the scale of the HalfCauchy with either the same tensorShape as specified for this vertex or a scalarpublic HalfCauchyVertex(long[] tensorShape, double scale)
public HalfCauchyVertex(Vertex<DoubleTensor,?> scale)
public HalfCauchyVertex(double scale)
public double logProb(DoubleTensor value)
Probabilistic
logProb
in interface Probabilistic<DoubleTensor>
logProb
in class CauchyVertex
value
- The supplied value.public LogProbGraph logProbGraph()
logProbGraph
in interface LogProbGraphSupplier
logProbGraph
in class CauchyVertex
public java.util.Map<Vertex,DoubleTensor> dLogProb(DoubleTensor value, java.util.Set<? extends Vertex> withRespectTo)
Probabilistic
dLogProb
in interface Probabilistic<DoubleTensor>
dLogProb
in class CauchyVertex
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 CauchyVertex