public class UniformVertex extends DoubleVertex implements ProbabilisticDouble
Constructor and Description |
---|
UniformVertex(double xMin,
double xMax) |
UniformVertex(double xMin,
DoubleVertex xMax) |
UniformVertex(DoubleVertex xMin,
double xMax) |
UniformVertex(DoubleVertex xMin,
DoubleVertex xMax)
One to one constructor for mapping some shape of mu and sigma to
a matching shaped Uniform Vertex
|
UniformVertex(long[] tensorShape,
double xMin,
double xMax) |
UniformVertex(long[] tensorShape,
double xMin,
DoubleVertex xMax) |
UniformVertex(long[] tensorShape,
DoubleVertex xMin,
double xMax) |
UniformVertex(long[] tensorShape,
DoubleVertex xMin,
DoubleVertex xMax)
One xMin or xMax or both that match a proposed tensor shape of Uniform Vertex
|
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 |
getXMax() |
DoubleVertex |
getXMin() |
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, ceil, concat, cos, div, div, divideBy, divideBy, equalTo, exp, floor, forwardModeAutoDifferentiation, getValue, greaterThan, greaterThanOrEqualTo, lambda, lambda, lessThan, lessThanOrEqualTo, log, logGamma, matrixDeterminant, matrixInverse, matrixMultiply, max, min, minus, minus, multiply, multiply, notEqualTo, observe, observe, plus, plus, pow, pow, reshape, reverseDiv, reverseMinus, reverseModeAutoDifferentiation, round, setAndCascade, setAndCascade, setValue, setValue, sigmoid, sin, slice, sum, 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, lazyEval, observe, observeOwnValue, removeLabel, sample, setAndCascade, setLabel, 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
getDerivativeWrtLatents
public UniformVertex(long[] tensorShape, DoubleVertex xMin, DoubleVertex xMax)
If all provided parameters are scalar then the proposed shape determines the shape
tensorShape
- desired tensor shapexMin
- the inclusive lower bound of the Uniform with either the same shape as specified for this vertex or a scalarxMax
- the exclusive upper bound of the Uniform with either the same shape as specified for this vertex or a scalarpublic UniformVertex(DoubleVertex xMin, DoubleVertex xMax)
xMin
- the inclusive lower bound of the Uniform with either the same shape as specified for this vertex or a scalarxMax
- the exclusive upper bound of the Uniform with either the same shape as specified for this vertex or a scalarpublic UniformVertex(DoubleVertex xMin, double xMax)
public UniformVertex(double xMin, DoubleVertex xMax)
public UniformVertex(double xMin, double xMax)
public UniformVertex(long[] tensorShape, DoubleVertex xMin, double xMax)
public UniformVertex(long[] tensorShape, double xMin, DoubleVertex xMax)
public UniformVertex(long[] tensorShape, double xMin, double xMax)
public DoubleVertex getXMin()
public DoubleVertex getXMax()
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