Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.jstacs.sequenceScores.statisticalModels.differentiable
Class DifferentiableStatisticalModelFactory

    java.lang.Object
      de.jstacs.sequenceScores.statisticalModels.differentiable.DifferentiableStatisticalModelFactory

    public class DifferentiableStatisticalModelFactory

extends Object

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.

Author:
  Jan Grau, Jens Keilwagen

Constructor Summary
`DifferentiableStatisticalModelFactory()`

Method Summary
`static HomogeneousMMDiffSM` | `createHomogeneousMarkovModel(AlphabetContainer con, double ess, int order, int priorLength)` This method returns a homogeneous Markov model with user-specified order.
`static BayesianNetworkDiffSM` | `createInhomogeneousMarkovModel(AlphabetContainer con, int length, double ess, int order)` This method returns a inhomogeneous Markov model (IMM) with user-specified order.
`static MarkovRandomFieldDiffSM` | `createMarkovRandomField(AlphabetContainer con, int length, String constraintType)` This method allows to create a `MarkovRandomFieldDiffSM` of the specified length and with the given constraint type.
`static MixtureDiffSM` | `createMixtureModel(DifferentiableStatisticalModel[] models)` This method allows to create a `MixtureDiffSM` that models a mixture of individual component `DifferentiableStatisticalModel`s.
`static BayesianNetworkDiffSM` | `createPWM(AlphabetContainer con, int length, double ess)` This method returns a position weight matrix (PWM).
`static StrandDiffSM` | `createStrandModel(DifferentiableStatisticalModel model)` This method allows to create a `StrandDiffSM` that allows to score binding sites on both strand of DNA.
`static ExtendedZOOPSDiffSM` | `createZOOPS(int length, DifferentiableStatisticalModel motif, HomogeneousDiffSM bg)` This method allows to create a "zero or one occurrence per sequence" (ZOOPS) model that allows to discover binding sites in a `DataSet`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DifferentiableStatisticalModelFactory

    public DifferentiableStatisticalModelFactory()

Method Detail

### createPWM

    public static BayesianNetworkDiffSM createPWM(AlphabetContainer con,
                                                  int length,
                                                  double ess)
                                           throws Exception

  This method returns a position weight matrix (PWM). A PWM assumes that all positions of a sequence are statistically independent.

  Parameters:
    `con` - the `AlphabetContainer` of the PWM
    `length` - the length of the PWM, i.e., the length of the sequences that can be modeled
    `ess` - the equivalent sample size (ess) of the PWM for the BDeu prior on its parameters
  Returns:
    the PWM
  Throws:
    `Exception` - if the model can not be created correctly

### createInhomogeneousMarkovModel

    public static BayesianNetworkDiffSM createInhomogeneousMarkovModel(AlphabetContainer con,
                                                                       int length,
                                                                       double ess,
                                                                       int order)
                                                                throws Exception

  This method returns a inhomogeneous Markov model (IMM) with user-specified order.

  Parameters:
    `con` - the `AlphabetContainer` of the IMM
    `length` - the length of the IMM, i.e., the length of the sequences that can be modeled
    `ess` - the equivalent sample size (ess) of the IMM for the BDeu prior on its parameters
    `order` - 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)
  Returns:
    the IMM
  Throws:
    `Exception` - if the model can not be created correctly

### createHomogeneousMarkovModel

    public static HomogeneousMMDiffSM createHomogeneousMarkovModel(AlphabetContainer con,
                                                                   double ess,
                                                                   int order,
                                                                   int priorLength)

  This method returns a homogeneous Markov model with user-specified order.

  Parameters:
    `con` - the `AlphabetContainer` of the model
    `ess` - the equivalent sample size (ess) of the class of this model, used for the BDeu prior on its parameters in conjunction with `priorLength`
    `order` - 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)
    `priorLength` - the a-priorily expected length of input sequences, is multiplied by `ess` before computing hyper-parameters
  Returns:
    the homogeneous Markov model

### createStrandModel

    public static StrandDiffSM createStrandModel(DifferentiableStatisticalModel model)
                                          throws CloneNotSupportedException,
                                                 WrongAlphabetException

  This method allows to create a `StrandDiffSM` that allows to score binding sites on both strand of DNA. The strand preferences is learned together with the supplied `DifferentiableStatisticalModel`.

  Parameters:
    `model` - the internally used model
  Returns:
    the `StrandDiffSM`
  Throws:
    `CloneNotSupportedException` - if the supplied `DifferentiableStatisticalModel` could not be cloned
    `WrongAlphabetException` - if the `AlphabetContainer` of the supplied `DifferentiableStatisticalModel` is not `AlphabetContainer.isReverseComplementable()`

### createMixtureModel

    public static MixtureDiffSM createMixtureModel(DifferentiableStatisticalModel[] models)
                                            throws CloneNotSupportedException

  This method allows to create a `MixtureDiffSM` that models a mixture of individual component `DifferentiableStatisticalModel`s.

  Parameters:
    `models` - the internally used models
  Returns:
    the `MixtureDiffSM`
  Throws:
    `CloneNotSupportedException` - if the supplied `DifferentiableStatisticalModel`s could not be cloned

### createZOOPS

    public static ExtendedZOOPSDiffSM createZOOPS(int length,
                                                  DifferentiableStatisticalModel motif,
                                                  HomogeneousDiffSM bg)
                                           throws Exception

  This method allows to create a "zero or one occurrence per sequence" (ZOOPS) model that allows to discover binding sites in a `DataSet`.

  Parameters:
    `length` - the length of the input `Sequence`s (only fixed length allowed)
    `motif` - the internally used model for the binding sites
    `bg` - the internally used model for the flanking sequence
  Returns:
    the ZOOPS model
  Throws:
    `Exception` - if the model can not be created correctly

### createMarkovRandomField

    public static MarkovRandomFieldDiffSM createMarkovRandomField(AlphabetContainer con,
                                                                  int length,
                                                                  String constraintType)

  This method allows to create a `MarkovRandomFieldDiffSM` of the specified length and with the given constraint type.

  Parameters:
    `con` - the `AlphabetContainer` of the `MarkovRandomFieldDiffSM`
    `length` - the length of the `Sequence`s the `MarkovRandomFieldDiffSM` can handle
    `constraintType` - the constraint type, see `ConstraintManager.extract(int, String)`
  Returns:
    the new `MarkovRandomFieldDiffSM`
  See Also:
    `ConstraintManager.extract(int, String)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD