|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jstacs.sequenceScores.statisticalModels.trainable.discrete.inhomogeneous.StructureLearner
public class StructureLearner
This class can be used to learn the structure of any discrete model.
Nested Class Summary | |
---|---|
static class |
StructureLearner.LearningType
This enum defines the different types of learning that are
possible with the StructureLearner . |
static class |
StructureLearner.ModelType
This enum defines the different types of models that can be
learned with the StructureLearner . |
Constructor Summary | |
---|---|
StructureLearner(AlphabetContainer con,
int length)
Creates a StructureLearner with equivalent sample
size (ess) = 0. |
|
StructureLearner(AlphabetContainer con,
int length,
double ess)
Creates a new StructureLearner for a given
AlphabetContainer , a given length and a given equivalent
sample size (ess). |
Method Summary | |
---|---|
AlphabetContainer |
getAlphabetContainer()
This method returns the AlphabetContainer of the
StructureLearner . |
double |
getEss()
This method returns the ess (equivalent sample size) of the StructureLearner . |
int[][] |
getStructure(DataSet data,
double[] weights,
StructureLearner.ModelType model,
byte order,
StructureLearner.LearningType method)
This method finds the optimal structure of a model by using a given learning method (in some sense). |
static int[][] |
getStructure(Tensor t,
StructureLearner.ModelType model,
byte order)
This method can be used to determine the optimal structure of a model. |
SymmetricTensor |
getTensor(DataSet data,
double[] weights,
byte order,
StructureLearner.LearningType method)
This method can be used to compute a Tensor that can be used to
determine the optimal structure. |
void |
setESS(double ess)
This method sets the ess (equivalent sample size) of the StructureLearner . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StructureLearner(AlphabetContainer con, int length, double ess) throws IllegalArgumentException
StructureLearner
for a given
AlphabetContainer
, a given length and a given equivalent
sample size (ess).
con
- the alphabets this instance should uselength
- the lengthess
- the ess (equivalent sample size, has to
be non-negative)
IllegalArgumentException
- if the AlphabetContainer
is not discrete, the length
is not matching with the AlphabetContainer
or the ess
is below 0public StructureLearner(AlphabetContainer con, int length) throws IllegalArgumentException
StructureLearner
with equivalent sample
size (ess) = 0.
con
- the alphabets this instance should uselength
- the length
IllegalArgumentException
- if the AlphabetContainer
is not discrete or the
length is not matching with the AlphabetContainer
StructureLearner(AlphabetContainer, int, double)
Method Detail |
---|
public AlphabetContainer getAlphabetContainer()
AlphabetContainer
of the
StructureLearner
.
AlphabetContainer
of the StructureLearner
public double getEss()
StructureLearner
.
StructureLearner
public void setESS(double ess) throws IllegalArgumentException
StructureLearner
.
ess
- the ess of the StructureLearner
IllegalArgumentException
- if ess < 0
public int[][] getStructure(DataSet data, double[] weights, StructureLearner.ModelType model, byte order, StructureLearner.LearningType method) throws Exception
data
- the DataSet
weights
- the weightsmodel
- the kind of modelorder
- the Markov ordermethod
- the learning method
Exception
- if something went wronggetTensor(DataSet, double[], byte, LearningType)
,
getStructure(Tensor, ModelType, byte)
public static int[][] getStructure(Tensor t, StructureLearner.ModelType model, byte order) throws Exception
t
- the tensor containing all relevant weights (includes the
learning method for the structure)model
- the model typeorder
- the model order
Exception
- if something in the algorithm went wronggetTensor(DataSet, double[], byte, LearningType)
public SymmetricTensor getTensor(DataSet data, double[] weights, byte order, StructureLearner.LearningType method) throws IllegalArgumentException, WrongAlphabetException
Tensor
that can be used to
determine the optimal structure.
data
- the dataweights
- the weightsorder
- the Markov ordermethod
- the learning type
IllegalArgumentException
- if something is wrong with the given arguments
WrongAlphabetException
- if the AlphabetContainer
of the data is not correctgetStructure(Tensor, ModelType, byte)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |