public class R_D.ForestSearch.M extends R_D.M
R_D.ForestSearch
-model. Note
stats(Vector,int,int)
in particular.R_D.M.Transform
Model.Defaults
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 |
---|---|
Linear1.M[] |
Lin1
The models for the with-parent variables.
|
int |
nChildren
The number of variables that have a parent.
|
NormalUPM.M[] |
Nrml
The models for the parent-less variables.
|
int[] |
parent
If parent[i]≥0 then variable i has that parent.
|
Constructor and Description |
---|
M(double msg1,
double msg2,
Value sp)
'sp' contains [p0, p2, ..., p(D-1)] where p_i is the parent
of 'i', a negative value indicates that p_i has "no parent",
parameters ⟨μ,σ⟩ of the various
parent-less N_(μ,σ), and ⟨a,b,s⟩ of
the parented Linear1_(a,b,s).
|
Modifier and Type | Method and Description |
---|---|
double |
nlLH(Value ss)
Negative log likelihood for data-set ds where
ss=
stats(ds) . |
double |
nlPdf(Value v)
The negative log pdf, nlPdf(d), of a datum d,
must be specified to define a ByPdf.
|
void |
random(double[] xs)
TODO – not tested!
|
Value.Tuple |
stats(boolean add,
Value ss0,
Value ss1)
Combine (+/-) two
statistics ,
ss0 and ss1. |
Value.Tuple |
stats(Vector ds,
int lo,
int hi)
Note that these M.stats(...) differs from
R_D.ForestSearch.stats(Vector,int,int) because
parent[] is known in M. |
asEstimator, asUPModel, m1m2sp, msg, msg1, msg1bits, msg2, msg2bits, msgBits, nl2LH, nl2Pr, pr, random, randomSeries, statParams, stats, stats, sumNlPr, transform, type, zeroTriv
public final int[] parent
public final int nChildren
public final NormalUPM.M[] Nrml
public final Linear1.M[] Lin1
public M(double msg1, double msg2, Value sp)
public Value.Tuple stats(Vector ds, int lo, int hi)
R_D.ForestSearch.stats(Vector,int,int)
because
parent[]
is known in M.
Uses R_D.ds2NorL1stats(la.maths.Vector, int[])
.public Value.Tuple stats(boolean add, Value ss0, Value ss1)
statistics
,
ss0 and ss1.public double nlPdf(Value v)
ByPdf.M
pdf(d)
.