public abstract class Discretes.M extends UPModel.M
nlPr_n(n)
.Model.Defaults, Model.Transform
Value.Atomic, Value.Bool, Value.Char, Value.Chars, Value.Cts, Value.Defer, Value.Discrete, Value.Enum, Value.Inc_Or, Value.Int, Value.Lambda, Value.List, Value.Maybe, Value.Option, Value.Real, Value.Scannable, Value.Structured, Value.Triv, Value.Tuple
Modifier and Type | Method and Description |
---|---|
abstract double |
nlPr_n(int n)
Back-room works for negative log probability of datum int n,
nlPr(la.la.Value) ; it must be implemented in an instance. |
double |
nlPr(Value d)
Get nlPr(d) from
nlPr_n (d.n()). |
double |
pr_n(int n)
Back-room works for
pr(la.la.Value) , returns
nlPr_n(n) |
double |
pr(Value d)
Get pr(d) from
pr_n (d.n()). |
abstract int |
random_n()
Back-room works for
Model.random() . |
Discretes.M |
shifted(int offset)
Shift 'this' fully parameterised Model of Discretes by
+
offset (~shift data by -offset). |
asEstimator, asUPModel, m1m2sp, msg, msg1, msg1bits, msg2, msg2bits, msgBits, nl2LH, nl2Pr, nlLH, random, random, randomSeries, statParams, stats, stats, sumNlPr, transform, type, zeroTriv
public M(double msg1, double msg2, Value sp)
public double pr_n(int n)
pr(la.la.Value)
, returns
nlPr_n(n)
public abstract double nlPr_n(int n)
nlPr(la.la.Value)
; it must be implemented in an instance.public abstract int random_n()
Model.random()
. There is a tricky semantic
problem about turning it into a Value through random() -- e.g.,
does '1' denote C:DNA, or true:boolean, and so on (we first need
to know the Type
of the data-space).public Discretes.M shifted(int offset)
offset
(~shift data by -offset). Its nlPr(d)
and stats(ds,lo,hi) subtract offset
from data
before handing it to the unshifted Model. Note that shifting
a Bounded
Model may reduce the data-space.
Also see Discretes.shifted(int)
.