public class Tree extends UPFunctionModel
iType
, leafUPM
) - which
is quite general. The estimator is Tree.Est
.
The fully parameterised FunctionModels
are Tree.M
(abstract), Tree.Fork
(abstract),
Tree.Leaf
, Tree.DFork
and Tree.OFork
.Modifier and Type | Class and Description |
---|---|
class |
Tree.DFork
A fully
parameterised Tree FunctionModel that
tests a Discrete Bounded column (variable)
of the input datum to select a sub-Model
into which to descend. |
class |
Tree.Est
The class of Estimators for a Tree FunctionModel.
|
class |
Tree.Fork
|
class |
Tree.Leaf
A fully
parameterised Tree FunctionModel consisting
of a single Leaf; it contains a Model over the output
(dependent) datum, 'od'. |
class |
Tree.M
The superclass of fully
parameterised (Decision |
Classification | Regression) -Trees; see Tree.Leaf ,
Tree.DFork and Tree.OFork . |
class |
Tree.OFork
A fully
parameterised Tree FunctionModel that
compares an ordered field (variable) of the input
datum to the split to select a
sub-Model into which to descend. |
static class |
Tree.Param
The root class for the statistical parameter
of a fully parameterised
Tree FunctionModel. |
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 |
---|---|
Type |
iType
The
Type of the input datum (variable), id, in id→od. |
UPModel |
leafUPM
The UnParameterised Model of the output datum, od, that is to be
parameterised in each Leaf
of the fully parameterised Tree. |
static double |
log2
loge(2), i.e., one bit.
|
static Type.Option |
TreeParam
|
Modifier and Type | Method and Description |
---|---|
Tree.Est |
estimator(Value ps)
Return an
Estimator for a Tree FunctionModel,
M:id→od. |
static void |
main(java.lang.String[] argv)
main() allows Tree to be (slightly) tested, in isolation.
|
Tree.M |
sp2Model(double msg1,
double msg2,
Value sp)
Return a fully parameterised Tree FunctionModel.
|
Vector |
stats(boolean add,
Value ss0,
Value ss1)
Combine sufficient statisticses 'ss0' and 'ss1' additively
(add=true), or remove ss1 from ss0 (add=false).
|
Vector |
stats(Vector ds,
int lo,
int hi)
Statistics ss = stats(ds), of data-set ds, is ds itself.
|
apply
public static final double log2
public static final Type.Option TreeParam
public final UPModel leafUPM
parameterised
in each Leaf
of the fully parameterised
Tree. In general the instances
will have different statistical parameters.
Note that leafUPM can be a simple UPModel
--
Discretes
, Continuous
,
Multivariate
, etc. -- or even a
UPFunctionModel
(regression), say.public Tree(Value dp)
public Tree.M sp2Model(double msg1, double msg2, Value sp)
sp2Model
in class UPFunctionModel
public Vector stats(Vector ds, int lo, int hi)
public Vector stats(boolean add, Value ss0, Value ss1)
UPModel
stats(ds,lo,hi)
.public static void main(java.lang.String[] argv)