|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jstacs.models.ModelFactory
public class ModelFactory
This class allows to easily create some frequently used models. It offers only one way of creating each model and set some of the parameters to default values. If you like to set further models please check the constructors of the individual classes.
Constructor Summary | |
---|---|
ModelFactory()
|
Method Summary | |
---|---|
static BayesianNetworkModel |
createBayesianNetworkModel(AlphabetContainer con,
int length,
double ess,
byte order)
This method returns a Bayesian network model (BN) with user-specified order. |
static HomogeneousMM |
createHomogeneousMarkovModel(AlphabetContainer con,
double ess,
byte order)
This method returns a homogeneous Markov model with user-specified order. |
static BayesianNetworkModel |
createInhomogeneousMarkovModel(AlphabetContainer con,
int length,
double ess,
byte order)
This method returns a inhomogeneous Markov model (IMM) with user-specified order. |
static MixtureModel |
createMixtureModel(double[] hyper,
Model[] model)
This method allows to create a MixtureModel that allows to model a Sample as a mixture of individual components. |
static BayesianNetworkModel |
createPermutedMarkovModel(AlphabetContainer con,
int length,
double ess,
byte order)
This method returns a permuted Markov model (PMM) with user-specified order. |
static FSDAGModel |
createPWM(AlphabetContainer con,
int length,
double ess)
This method returns a position weight matrix (PWM). |
static StrandModel |
createStrandModel(Model model)
This method allows to create a StrandModel that allows to score binding sites on both strand of DNA. |
static SingleHiddenMotifMixture |
createZOOPS(Model motif,
Model bg,
double[] hyper,
boolean trainOnlyMotifModel)
This method allows to create a "zero or one occurrence per sequence" (ZOOPS) model that allows to discovers binding sites in a Sample . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ModelFactory()
Method Detail |
---|
public static FSDAGModel createPWM(AlphabetContainer con, int length, double ess) throws Exception
con
- the AlphabetContainer
of the PWMlength
- the length of the PWM, i.e., the length of the sequences that can be modeledess
- the equivalent sample size (ess) of the PWM, if 0 (zero) the model can be trained using maximum likelihood principle, otherwise it can be trained using the maximum a posteriori principle using the BDeu prior
Exception
- if the model can not be created correctlypublic static BayesianNetworkModel createInhomogeneousMarkovModel(AlphabetContainer con, int length, double ess, byte order) throws Exception
con
- the AlphabetContainer
of the IMMlength
- the length of the IMM, i.e., the length of the sequences that can be modeledess
- the equivalent sample size (ess) of the IMM, if 0 (zero) the model can be trained using maximum likelihood principle, otherwise it can be trained using the maximum a posteriori principle using the BDeu priororder
- the order of the IMM, i.e., the number of directly preceding random variables (=positions) that might have an influence on the probability of outcome of a random variable (=position)
Exception
- if the model can not be created correctlypublic static BayesianNetworkModel createPermutedMarkovModel(AlphabetContainer con, int length, double ess, byte order) throws Exception
con
- the AlphabetContainer
of the PMMlength
- the length of the PMM, i.e., the length of the sequences that can be modeledess
- the equivalent sample size (ess) of the PMM, if 0 (zero) the model can be trained using maximum likelihood principle, otherwise it can be trained using the maximum a posteriori principle using the BDeu priororder
- the order of the PMM, i.e., the number of random variables (=positions) that might have an influence on the probability of outcome of a random variable (=position)
Exception
- if the model can not be created correctlypublic static BayesianNetworkModel createBayesianNetworkModel(AlphabetContainer con, int length, double ess, byte order) throws Exception
con
- the AlphabetContainer
of the BNlength
- the length of the BN, i.e., the length of the sequences that can be modeledess
- the equivalent sample size (ess) of the BN, if 0 (zero) the model can be trained using maximum likelihood principle, otherwise it can be trained using the maximum a posteriori principle using the BDeu priororder
- the order of the BN, i.e., the number of random variables (=positions) that might have an influence on the probability of outcome of a random variable (=position)
Exception
- if the model can not be created correctlypublic static HomogeneousMM createHomogeneousMarkovModel(AlphabetContainer con, double ess, byte order) throws Exception
con
- the AlphabetContainer
of the modeless
- the equivalent sample size (ess) of the model, if 0 (zero) the model can be trained using maximum likelihood principle, otherwise it can be trained using the maximum a posteriori principle using the BDeu priororder
- the order of the model, i.e., the number of directly preceding random variables (=positions) that might have an influence on the probability of outcome of a random variable (=position)
Exception
- if the model can not be created correctlypublic static StrandModel createStrandModel(Model model) throws Exception
StrandModel
that allows to score binding sites on both strand of DNA.
model
- the internally used model
StrandModel
Exception
- if the model can not be created correctlypublic static MixtureModel createMixtureModel(double[] hyper, Model[] model) throws Exception
MixtureModel
that allows to model a Sample
as a mixture of individual components.
hyper
- the hyper parameters for the components (should be identical to the ESS of the components)model
- the internally used model
MixtureModel
Exception
- if the model can not be created correctlypublic static SingleHiddenMotifMixture createZOOPS(Model motif, Model bg, double[] hyper, boolean trainOnlyMotifModel) throws Exception
Sample
.
motif
- the internally used model for the binding sitesbg
- the internally used model for the flanking sequencehyper
- the hyper parameters for the components (should be identical to the ESS of the components)trainOnlyMotifModel
- a switch allowing to train either the motif model or both (motif and bg) models
Exception
- if the model can not be created correctly
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |