public class TrainableStatisticalModelFactory extends Object
Constructor and Description |
---|
TrainableStatisticalModelFactory() |
Modifier and Type | Method and Description |
---|---|
static BayesianNetworkTrainSM |
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 FSDAGTrainSM |
createInhomogeneousMarkovModel(AlphabetContainer con,
int length,
double ess,
byte order)
This method returns a inhomogeneous Markov model (IMM) with user-specified order.
|
static MixtureTrainSM |
createMixtureModel(double[] hyper,
TrainableStatisticalModel[] model)
This method allows to create a
MixtureTrainSM that allows to model a DataSet as a mixture of individual components. |
static BayesianNetworkTrainSM |
createPermutedMarkovModel(AlphabetContainer con,
int length,
double ess,
byte order)
This method returns a permuted Markov model (PMM) with user-specified order.
|
static FSDAGTrainSM |
createPWM(AlphabetContainer con,
int length,
double ess)
This method returns a position weight matrix (PWM).
|
static StrandTrainSM |
createStrandModel(TrainableStatisticalModel model)
This method allows to create a
StrandTrainSM that allows to score binding sites on both strand of DNA. |
static ZOOPSTrainSM |
createZOOPS(TrainableStatisticalModel motif,
TrainableStatisticalModel bg,
double[] hyper,
boolean trainOnlyMotifModel)
This method allows to create a "zero or one occurrence per sequence" (ZOOPS) model that allows to discover binding sites in a
DataSet . |
public static FSDAGTrainSM 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 priorException
- if the model can not be created correctlypublic static FSDAGTrainSM 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 BayesianNetworkTrainSM 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 BayesianNetworkTrainSM 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 StrandTrainSM createStrandModel(TrainableStatisticalModel model) throws Exception
StrandTrainSM
that allows to score binding sites on both strand of DNA.model
- the internally used modelStrandTrainSM
Exception
- if the model can not be created correctlypublic static MixtureTrainSM createMixtureModel(double[] hyper, TrainableStatisticalModel[] model) throws Exception
MixtureTrainSM
that allows to model a DataSet
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 modelMixtureTrainSM
Exception
- if the model can not be created correctlypublic static ZOOPSTrainSM createZOOPS(TrainableStatisticalModel motif, TrainableStatisticalModel bg, double[] hyper, boolean trainOnlyMotifModel) throws Exception
DataSet
.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) modelsException
- if the model can not be created correctly