public class CPT extends UPFunctionModel
n()
, such as a Value.Discrete
or a
Tuple
of Discretes, to a Model of the
output datum. The fully parameterised Model is CPT.M
.
In the simplest situation the output datum is modelled by
MultiState
Models but there is greater generality.Modifier and Type | Class and Description |
---|---|
class |
CPT.M
CPT.M, a fully parameterised Function Model, being a
conditional probability table.
|
UPFunctionModel.Est, UPFunctionModel.K
UPModel.Transform
Function.Native.WithInverse
Function.Cts2Cts, Function.Cts2Cts2Cts, Function.CtsD2CtsD, Function.HasInverse, Function.Native, Function.Native2, Function.Native3
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 |
---|---|
Value |
lwb
lwb, upb, the bounds on the input datum.
|
int |
lwb_n
lwb_n, upb_n, the bounds on the input datum, as ints.
|
Value |
upb
lwb, upb, the bounds on the input datum.
|
int |
upb_n
lwb_n, upb_n, the bounds on the input datum, as ints.
|
UPModel |
upm
The UnParameterised Model to be
parameterised
for each case (Value) of the input datum. |
Constructor and Description |
---|
CPT(Value dp)
Given problem-definition parameters,
dp = (lwb,upb,upm), construct an (UnParameterised) CPT
with (upb_n - lwb_n + 1) entries, each entry
being (eventually) an fully parameterised upm-Model.
|
Modifier and Type | Method and Description |
---|---|
UPFunctionModel.Est |
estimator(Value ps)
Return an Estimator of fully parameterised CPTs -- of
CPT.M . |
CPT.M |
sp2Model(double msg1,
double msg2,
Value sps)
Given sps, a Vector of statistical parameters, one for each
input Value (that is, one for each entry of the CPT), return
a fully parameterised
CPT Model . |
Vector |
stats(boolean add,
Value ss0,
Value ss1)
Calls upon
upm .stats(add,.,.). |
Vector |
stats(Vector ds,
int lo,
int hi)
Given a data-set, ds, calculate sufficient statistics
(of the output datum) for each possible case (Value) of
the input datum.
|
apply
public final Value lwb
public final Value upb
public final int lwb_n
public final int upb_n
public final UPModel upm
parameterised
for each case (Value) of the input datum.public CPT(Value dp)
public CPT.M sp2Model(double msg1, double msg2, Value sps)
CPT Model
.sp2Model
in class UPFunctionModel
public UPFunctionModel.Est estimator(Value ps)
CPT.M
. The parameter, 'ps' (e.g., on a prior),
is passed to the per-case-Estimator,
upm
.estimator(ps)
.