Version 4.1.5
Main Page | Class Hierarchy | Class List | File List | Class Members | Related Pages

PhasedPMarkov Class Reference

Phased Parcimonious Markov modelling, estimation and simulation. More...

#include <seqpp/PhasedPMarkov.h>

Inheritance diagram for PhasedPMarkov:

PhasedMarkov List of all members.

Public Member Functions

 PhasedPMarkov (Partition &part, const SequenceSet &seqset, short phase, short initial_phase=0, const string &prior_alpha_file=string(), bool motif_prior=true, double penalty=0., const string &xmlfile=string())
 Constructor 1 from a SequenceSet.
 PhasedPMarkov (Partition &part, const Sequence &seq, short phase, short initial_phase=0, const string &prior_alpha_file=string(), bool motif_prior=true, double penalty=0., const Translator &trans=Translator(), const string &xmlfile=string())
 Constructor 2 from a Sequence.
 PhasedPMarkov (Partition &part, unsigned long **count, short size, short order, short phase, const string &prior_alpha_file=string(), bool motif_prior=true, double penalty=0., const Translator &trans=Translator(), const string &xmlfile=string())
 Constructor 3 from a coded-word count.
 PhasedPMarkov (Partition &part, const string &count_file, short size, short order, short phase, const string &prior_alpha_file=string(), bool motif_prior=true, double penalty=0., const Translator &trans=Translator(), const string &xmlfile=string())
 Constructor 4 from a file containing coded-word count.
 PhasedPMarkov (Partition &part, short size, short order, short phase, const string &prior_alpha_file=string(), bool motif_prior=true, double penalty=0., bool alloc=true)
 Basic Constructor 5. No estimation.
void select (unsigned long **count, bool decal_required, const Translator &trans=Translator(), const string &xmlfile=string())
 performs the A Posteriori Maximisation
template<class TSeq1, class TSeq2>
double mean_post_log_likelihood (const TSeq1 &tseq_train, const TSeq2 &tseq_eval, short initial_phase_train=0, short initial_phase_eval=0)
double mean_post_log_likelihood (unsigned long **count_train, bool decal_required_t, unsigned long **count_eval, bool decal_required_e)
 return the mean post likelihood over the parameters and the trees
template<class TSeq>
double mean_post_log_likelihood (const TSeq &tseq_eval, short initial_phase_eval=0)
double mean_post_log_likelihood (unsigned long **count_eval, bool decal_required_e)
 return the mean post likelihood over the parameters and the trees
double mean_post_log_likelihood ()
 return the mean post likelihood over the parameters and the trees
template<class TSeq>
double post_log_likelihood (const TSeq &tseq_eval, short initial_phase_eval=0)
 compute the mean posterior likelihood over the parameters
double post_log_likelihood (unsigned long **count_eval, bool decal_required_e)
 compute the mean posterior likelihood over the parameters
void draw (unsigned long **count, bool decal_required, gsl_rng *r, const Translator &trans=Translator(), const string &xmlfile=string())
 draws a model
void draw (gsl_rng *r, const Translator &trans=Translator(), const string &xmlfile=string())
 draws a model
void info_nb_leaves () const
 returns info on the number of leaves for each phase
 ~PhasedPMarkov ()
 Destructor.

Protected Attributes

vector< pmm_forest * > _p_f
 Parcimonious Context Trees.

Detailed Description

Phased Parcimonious Markov modelling, estimation and simulation.

PhasedPMarkov is a PhasedMarkov object with a different estimation step. This object performs the estimation with the Parcimonious Markov algorithm and then transfoms, once per phase, the parcimonious context tree in a markovian matrix. xml outputs can be activated to save the associated trees.


Constructor & Destructor Documentation

PhasedPMarkov::PhasedPMarkov Partition part,
const SequenceSet seqset,
short  phase,
short  initial_phase = 0,
const string &  prior_alpha_file = string(),
bool  motif_prior = true,
double  penalty = 0.,
const string &  xmlfile = string()
[inline]
 

Constructor 1 from a SequenceSet.

Parameters:
part associated partition
seqset a set of sequences for estimation
phase phase
initial_phase phase of the first element of each sequence
prior_alpha_file file containing the alpha for the a priori law, one value per alphabet element, and for each phase (separated by a "#Phase i")
motif_prior activates a weight-function on the priors, weight proportionnal on each motif in the tree
penalty penalty on the leaves number, by default 0
xmlfile xmlfile for tree saving (if xml2 activated)

PhasedPMarkov::PhasedPMarkov Partition part,
const Sequence seq,
short  phase,
short  initial_phase = 0,
const string &  prior_alpha_file = string(),
bool  motif_prior = true,
double  penalty = 0.,
const Translator trans = Translator(),
const string &  xmlfile = string()
[inline]
 

Constructor 2 from a Sequence.

Parameters:
part associated partition
seq sequence for estimation
phase phase
initial_phase phase of the first element of each sequence
prior_alpha_file file containing the alpha for the a priori law, one value per alphabet element, and for each phase (separated by a "#Phase i")
motif_prior activates a weight-function on the priors, weight proportionnal on each motif in the tree
penalty penalty on the leaves number, by default 0
trans a Translator is required only for the xml saving
xmlfile xmlfile for tree saving (if xml2 activated)

PhasedPMarkov::PhasedPMarkov Partition part,
unsigned long **  count,
short  size,
short  order,
short  phase,
const string &  prior_alpha_file = string(),
bool  motif_prior = true,
double  penalty = 0.,
const Translator trans = Translator(),
const string &  xmlfile = string()
[inline]
 

Constructor 3 from a coded-word count.

Parameters:
part associated partition
count count of all the coded word(base size) of size order+1 for each phase, for estimation
size alphabet size
order markovian order associated to the word count
phase phase
prior_alpha_file file containing the alpha for the a priori law, one value per alphabet element, and for each phase (separated by a "#Phase i")
motif_prior activates a weight-function on the priors, weight proportionnal on each motif in the tree
penalty penalty on the leaves number, by default 0
trans a Translator is required only for the xml saving
xmlfile xmlfile for tree saving (if xml2 activated)

PhasedPMarkov::PhasedPMarkov Partition part,
const string &  count_file,
short  size,
short  order,
short  phase,
const string &  prior_alpha_file = string(),
bool  motif_prior = true,
double  penalty = 0.,
const Translator trans = Translator(),
const string &  xmlfile = string()
[inline]
 

Constructor 4 from a file containing coded-word count.

Parameters:
part associated partition
count_file file with count
size alphabet size
order markovian order associated to the word count
phase phase
prior_alpha_file file containing the alpha for the a priori law, one value per alphabet element, and for each phase (separated by a "#Phase i")
motif_prior activates a weight-function on the priors, weight proportionnal on each motif in the tree
penalty penalty on the leaves number, by default 0
trans a Translator is required only for the xml saving
xmlfile xmlfile for tree saving (if xml2 activated)

PhasedPMarkov::PhasedPMarkov Partition part,
short  size,
short  order,
short  phase,
const string &  prior_alpha_file = string(),
bool  motif_prior = true,
double  penalty = 0.,
bool  alloc = true
[inline]
 

Basic Constructor 5. No estimation.

Parameters:
part associated partition
size alphabet size
order markovian order associated to the word count
phase phase
prior_alpha_file file containing the alpha for the a priori law, one value per alphabet element, and for each phase (separated by a "#Phase i")
motif_prior activates a weight-function on the priors, weight proportionnal on each motif in the tree
penalty penalty on the leaves number, by default 0
alloc true for matrices memory allocation


Member Function Documentation

void PhasedPMarkov::draw gsl_rng *  r,
const Translator trans = Translator(),
const string &  xmlfile = string()
[inline]
 

draws a model

Parameters:
r random generator
trans a Translator is required for xml tree saving (if xml2 activated)
xmlfile xmlfile for tree saving (if xml2 activated)

void PhasedPMarkov::draw unsigned long **  count,
bool  decal_required,
gsl_rng *  r,
const Translator trans = Translator(),
const string &  xmlfile = string()
[inline]
 

draws a model

Parameters:
count count of all the coded word(base size) of size order+1 for each phase, for estimation
decal_required necessary when using a count of word from 1-word to (_max_depth+1)-word
r gsl random generator
trans a Translator is required for xml tree saving (if xml2 activated)
xmlfile xmlfile for tree saving (if xml2 activated)

double PhasedPMarkov::mean_post_log_likelihood unsigned long **  count_eval,
bool  decal_required_e
[inline]
 

return the mean post likelihood over the parameters and the trees

Parameters:
count_eval count of all the coded word(base size) of size order+1 for each phase, for evaluation step
decal_required_e necessary when using a count of word from 1-word to (_max_depth+1)-word

template<class TSeq>
double PhasedPMarkov::mean_post_log_likelihood const TSeq &  tseq_eval,
short  initial_phase_eval = 0
[inline]
 

Parameters:
tseq_eval sequence(s) (set) for the evaluation step
initial_phase_eval phase of the first element of each sequence

double PhasedPMarkov::mean_post_log_likelihood unsigned long **  count_train,
bool  decal_required_t,
unsigned long **  count_eval,
bool  decal_required_e
[inline]
 

return the mean post likelihood over the parameters and the trees

Parameters:
count_train count of all the coded word(base size) of size order+1 for each phase, for training step
decal_required_t necessary when using a count of word from 1-word to (_max_depth+1)-word
count_eval count of all the coded word(base size) of size order+1 for each phase, for evaluation step
decal_required_e necessary when using a count of word from 1-word to (_max_depth+1)-word

template<class TSeq1, class TSeq2>
double PhasedPMarkov::mean_post_log_likelihood const TSeq1 &  tseq_train,
const TSeq2 &  tseq_eval,
short  initial_phase_train = 0,
short  initial_phase_eval = 0
[inline]
 

Parameters:
tseq_train sequence(s) (set) for the training step
initial_phase_train phase of the first element of each sequence
tseq_eval sequence(s) (set) for the evaluation step
initial_phase_eval phase of the first element of each sequence

double PhasedPMarkov::post_log_likelihood unsigned long **  count_eval,
bool  decal_required_e
[inline]
 

compute the mean posterior likelihood over the parameters

Parameters:
count_eval count of all the coded word(base size) of size order+1 for each phase, for evaluation step
decal_required_e necessary when using a count of word from 1-word to (_max_depth+1)-word

template<class TSeq>
double PhasedPMarkov::post_log_likelihood const TSeq &  tseq_eval,
short  initial_phase_eval = 0
[inline]
 

compute the mean posterior likelihood over the parameters

Parameters:
tseq_eval sequence(s) (set) for the evaluation step
initial_phase_eval phase of the first element of each sequence

void PhasedPMarkov::select unsigned long **  count,
bool  decal_required,
const Translator trans = Translator(),
const string &  xmlfile = string()
[inline]
 

performs the A Posteriori Maximisation

Parameters:
count count of all the coded word(base size) of size order+1 for each phase, for estimation
decal_required necessary when using a count of word from 1-word to (_max_depth+1)-word
trans a Translator is required for xml tree saving (if xml2 activated)
xmlfile xmlfile for tree saving (if xml2 activated)


The documentation for this class was generated from the following file:



Download seq++ 4.1.5
Download previous versions
Statistique & Genome Home


Generated on Thu Aug 4 20:33:13 2005 for seqpp by doxygen 1.3.9.1