public class CPT.M extends UPFunctionModel.M
CPT
.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 | Field and Description |
---|---|
Model[] |
condMdls
An array of now fully parameterised (conditional)
upm -Models, one Model for each possible
case (Value) of the input datum. |
Constructor and Description |
---|
M(double msg1,
double msg2,
Vector sps)
Given (m1,m2,sps), where sps is a Vector of
statistical parameters, one for each entry of
the CPT, construct the fully parameterised CPT.
|
Modifier and Type | Method and Description |
---|---|
Model |
condModel(Value id)
Return the
Model of the ouput datum conditional
upon the Value of the input datum (variable), 'id'. |
double |
nlLH(Value ss)
Given sufficient statistics,
ss =
stats(ds) , of a
data-set, ds, return the negative log likelihood of ds. |
Vector |
stats(boolean add,
Value ss0,
Value ss1)
Calls upon
condMdls [.].stats(add,.,.). |
Vector |
stats(Vector ds,
int lo,
int hi)
Given a data-set, ds, calculate statistics
(of the output datum) for each case (Value) of the
input datum.
|
asGiven, asGiven, toString
asUPModel, condNl2Pr, condNlPr, condPr, nlPr, pr, random, random
asEstimator, m1m2sp, msg, msg1, msg1bits, msg2, msg2bits, msgBits, nl2LH, nl2Pr, random, randomSeries, statParams, stats, stats, sumNlPr, transform, type, zeroTriv
public Model condModel(Value id)
Model
of the ouput datum conditional
upon the Value of the input datum (variable), 'id'.
The kind of Model that can returned is arbitrary, as specified
by CPT
; it is not restricted to MultiState Models.condModel
in class FunctionModel
public Vector stats(Vector ds, int lo, int hi)
condMdls
[.]stats(.,.,.,.,.).
More on stats here
.stats
in class UPFunctionModel.M
public Vector stats(boolean add, Value ss0, Value ss1)
condMdls
[.].stats(add,.,.).stats
in class UPFunctionModel.M