public class BinomialVertex extends IntegerVertex implements ProbabilisticInteger
Constructor and Description |
---|
BinomialVertex(double p,
int n) |
BinomialVertex(double p,
IntegerVertex n) |
BinomialVertex(DoubleVertex p,
int n) |
BinomialVertex(DoubleVertex p,
IntegerVertex n) |
BinomialVertex(int[] tensorShape,
double p,
int n) |
BinomialVertex(int[] tensorShape,
double p,
IntegerVertex n) |
BinomialVertex(int[] tensorShape,
DoubleVertex p,
int n) |
BinomialVertex(int[] tensorShape,
DoubleVertex p,
IntegerVertex n) |
Modifier and Type | Method and Description |
---|---|
java.util.Map<Vertex,DoubleTensor> |
dLogProb(IntegerTensor value,
java.util.Set<? extends Vertex> withRespectTo)
The partial derivatives of the natural log prob.
|
double |
logProb(IntegerTensor kTensor)
This is the natural log of the probability at the supplied value.
|
IntegerTensor |
sample(KeanuRandom random) |
abs, concat, div, div, divideBy, divideBy, divideBy, equalTo, getValue, greaterThan, greaterThanOrEqualTo, lambda, lambda, lessThan, lessThanOrEqualTo, minus, minus, minus, multiply, multiply, multiply, notEqualTo, observe, observe, plus, plus, plus, pow, pow, reshape, setAndCascade, setAndCascade, setValue, setValue, slice, sum, take, times, times, unaryMinus
addChild, addParent, addParents, equals, eval, getChildren, getConnectedGraph, getId, getIndentation, getLabel, getObservedValue, getParents, getRawValue, getShape, getValue, hashCode, hasValue, isObserved, isProbabilistic, labeledAs, lazyEval, observe, observeOwnValue, sample, setAndCascade, setLabel, setParents, setParents, setValue, toString, unobserve
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
dLogPmf, dLogPmf, dLogPmf, logPmf, logPmf, logPmf
dLogProb, dLogProbAtValue, dLogProbAtValue, getValue, keepOnlyProbabilisticVertices, logProbAtValue, setValue
getObservedValue, isObserved, observableTypeFor, observe, unobserve
public BinomialVertex(int[] tensorShape, DoubleVertex p, IntegerVertex n)
public BinomialVertex(int[] tensorShape, double p, IntegerVertex n)
public BinomialVertex(int[] tensorShape, DoubleVertex p, int n)
public BinomialVertex(int[] tensorShape, double p, int n)
public BinomialVertex(DoubleVertex p, IntegerVertex n)
public BinomialVertex(double p, IntegerVertex n)
public BinomialVertex(DoubleVertex p, int n)
public BinomialVertex(double p, int n)
public double logProb(IntegerTensor kTensor)
Probabilistic
logProb
in interface Probabilistic<IntegerTensor>
kTensor
- The supplied value.public java.util.Map<Vertex,DoubleTensor> dLogProb(IntegerTensor value, java.util.Set<? extends Vertex> withRespectTo)
Probabilistic
dLogProb
in interface Probabilistic<IntegerTensor>
value
- at a given valuewithRespectTo
- list of parents to differentiate with respect topublic IntegerTensor sample(KeanuRandom random)
sample
in class Vertex<IntegerTensor>
random
- source of randomness