public class Mixture.Est extends UPModel.Est
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 |
---|---|
Estimator |
classEst
The estimator for an individual class (cluster, component)
of the Mixture
Model . |
Modifier and Type | Method and Description |
---|---|
Mixture.M |
EM(double[][] mshp,
Vector ds)
Find a good Mixture Model starting from the given
memberships. |
Mixture.M |
EM(Mixture.M mx,
double[][] mshp,
Vector ds)
The core Expectation Maximization algorithm.
|
Mixture.M |
EM(Mixture.M mx,
Vector ds)
Find a good Mixture Model starting from the given
Model, mx. |
Mixture.M |
join(Mixture.M mx,
int c1,
int c2,
Vector ds)
Merge classes c1 and c2 into one class,
and
adjust . |
Mixture.M |
kill(Mixture.M mx,
int c,
Vector ds)
Remove class 'c', redistribute its members,
and
adjust . |
Mixture.M |
makeNclasses(int nClass,
Vector ds)
Try to
Find a good Mixture Model with
'nClass' classes (clusters). |
void |
Model2mshp(Mixture.M mx,
double[][] mshp,
Vector ds)
Given a Mixture Model, mx, return the (fractional)
class memberships, mshp, of the data.
|
double[][] |
Model2mshp(Mixture.M mx,
Vector ds)
|
double[] |
mshp2abndc(double[][] mshp,
Vector ds)
Calculate class abundances from class memberships, mshp.
|
Mixture.M |
mshp2Model(double[][] mshp,
Vector ds)
Given (possibly fractional) class memberships, mshp,
(re-)estimate the Mixture Model (but note that msg2()
is zero).
|
double[][] |
randomMshp(int nClass,
int nData)
Return a matrix of random class memberships.
|
Mixture.M |
split(Mixture.M mx,
int c,
Vector ds)
Split class 'c', replace it with two sub-classes,
and
adjust . |
Mixture.M |
ss2Model(Value ss)
Given ss (=ds), estimate a Mixture
Model . |
defnParams, sp2Model, stats, stats, toString
apply, asUPModel, ds2Model, ds2ModelSp, ss2ModelSp, stats, stats
public Est(Value ps)
public Mixture.M EM(Mixture.M mx, double[][] mshp, Vector ds)
public Mixture.M EM(double[][] mshp, Vector ds)
Find
a good Mixture Model starting from the given
memberships. The number of classes (clusters) is not changed.public Mixture.M EM(Mixture.M mx, Vector ds)
Find
a good Mixture Model starting from the given
Model, mx. The number of classes (clusters) is not changed.public Mixture.M kill(Mixture.M mx, int c, Vector ds)
adjust
.public Mixture.M split(Mixture.M mx, int c, Vector ds)
adjust
.public Mixture.M join(Mixture.M mx, int c1, int c2, Vector ds)
adjust
.public Mixture.M mshp2Model(double[][] mshp, Vector ds)
weights
.public double[] mshp2abndc(double[][] mshp, Vector ds)
public void Model2mshp(Mixture.M mx, double[][] mshp, Vector ds)
public double[][] Model2mshp(Mixture.M mx, Vector ds)
Model2mshp(mml.Mixture.M, double[][], la.maths.Vector)
. This is another parameterisation.public double[][] randomMshp(int nClass, int nData)
weights
.