|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jstacs.models.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 ess = 0. |
|
StructureLearner(AlphabetContainer con,
int length,
double ess)
Creates a StructureLearner |
|
| Method Summary | |
|---|---|
AlphabetContainer |
getAlphabetContainer()
This method returns the AlphabetContainer of the StructureLearner. |
double |
getEss()
This method returns the ESS of the StructureLearner. |
int[][] |
getStructure(Sample data,
double[] weights,
StructureLearner.ModelType model,
byte order,
StructureLearner.LearningType method)
This method finds the optimal structure (in some sense). |
static int[][] |
getStructure(Tensor t,
StructureLearner.ModelType model,
byte order)
This method can be used to determine the optimal structure. |
SymmetricTensor |
getTensor(Sample 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 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
con - the alphabets this instance should uselength - the lengthess - the ess (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 0
public StructureLearner(AlphabetContainer con,
int length)
throws IllegalArgumentException
con - length -
IllegalArgumentException - if the AlphabetContainer is not discrete or the length is not matching with the AlphabetContainerStructureLearner(AlphabetContainer, int, double)| Method Detail |
|---|
public AlphabetContainer getAlphabetContainer()
public double getEss()
public void setESS(double ess)
throws IllegalArgumentException
ess - the SS of the StructureLearner
IllegalArgumentException - if the ess is below 0
public int[][] getStructure(Sample data,
double[] weights,
StructureLearner.ModelType model,
byte order,
StructureLearner.LearningType method)
throws Exception
data - the Sampleweights - the weightsmodel - the kind of modelorder - the markov ordermethod - the learning method
Exception - if something went wrong
public static int[][] getStructure(Tensor t,
StructureLearner.ModelType model,
byte order)
throws Exception
t - the tensor containing all relevant weightsmodel - the model typeorder - the model order
Exception - if something in the algorithm went wrong
public SymmetricTensor getTensor(Sample data,
double[] weights,
byte order,
StructureLearner.LearningType method)
throws IllegalArgumentException,
WrongAlphabetException
data - the dataweights - the weightsorder - the markov ordermethod - the learning type
IllegalArgumentException
WrongAlphabetException - if the AlphabetContainer of the data is not correct
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||