public class KDEVertex extends DoubleVertex implements Differentiable, ProbabilisticDouble, Samplable<DoubleTensor>
Constructor and Description |
---|
KDEVertex(DoubleTensor samples) |
KDEVertex(DoubleTensor samples,
double bandwidth) |
KDEVertex(java.util.List<java.lang.Double> samples) |
KDEVertex(java.util.List<java.lang.Double> samples,
double bandwidth) |
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 |
getBandwidth() |
DoubleTensor |
getInputSamples() |
long[] |
getSampleShape() |
double |
logProb(DoubleTensor x)
This is the natural log of the probability at the supplied value.
|
DoubleTensor |
pdf(DoubleTensor x) |
void |
resample(int nSamples,
KeanuRandom random) |
DoubleTensor |
sample(int nSamples,
KeanuRandom random) |
DoubleTensor |
sample(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, 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
public KDEVertex(DoubleTensor samples, double bandwidth)
public KDEVertex(DoubleTensor samples)
public KDEVertex(java.util.List<java.lang.Double> samples)
public KDEVertex(java.util.List<java.lang.Double> samples, double bandwidth)
public double getBandwidth()
public DoubleTensor getInputSamples()
public DoubleTensor pdf(DoubleTensor x)
public double logProb(DoubleTensor x)
Probabilistic
logProb
in interface Probabilistic<DoubleTensor>
x
- 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(int nSamples, KeanuRandom random)
public DoubleTensor sample(KeanuRandom random)
sample
in interface Samplable<DoubleTensor>
random
- source of randomnesspublic void resample(int nSamples, KeanuRandom random)
public long[] getSampleShape()