public class BestOf extends UPModel
upms[]
;
all are considered to be equally likely apriori.
All members of upms[] must of course be Models of the same kind of data,
but their sufficient statistics and the parameters of their estimators
and their parameterised Models can differ, one from another.
The fully parameterised BestOf-Model is BestOf.M
.Modifier and Type | Class and Description |
---|---|
class |
BestOf.M
The fully parameterised Model;
BestOf is the UnParameterised Model. |
UPModel.Est, 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 |
---|---|
UPModel[] |
upms
The alternative UnParameterised Models from which 'this' BestOf
is to choose just one in estimating
BestOf.M . |
Constructor and Description |
---|
BestOf(Value upms)
The problem definition parameter 'upms' is a Tuple of
UnParameterised Models; saved as
upms[] . |
Modifier and Type | Method and Description |
---|---|
UPModel.Est |
estimator(Value ps)
|
BestOf.M |
sp2Model(double msg1,
double msg2,
Value sp)
Given first- and second-part message lengths, msg1 and msg2, and
statistical parameter(s), sp, return a fully parameterised
BestOf.M Model. |
Value.Tuple |
stats(boolean add,
Value ss0,
Value ss1)
Combine statistics ss0 and ss1, either ss0 "+" ss1,
or ss0 "-" ss1, depending on 'add' being true or false.
|
Value.Tuple |
stats(Vector ds,
int lo,
int hi)
Calculate the sufficient statistics of ds[lo,hi) for
all possible alternatives
upms[.] . |
public BestOf.M sp2Model(double msg1, double msg2, Value sp)
BestOf.M
Model.public Value.Tuple stats(Vector ds, int lo, int hi)
upms[.]
.
Return a Tuple of these sufficient statistics.
Note that M.stats(...)
is simpler because
one of the alternatives has been chosen in M.public Value.Tuple stats(boolean add, Value ss0, Value ss1)