![]() |
Version 4.2.0 |
#include <seqpp/PhasedPMarkov.h>

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. | |
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.
| 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.
| 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) |
References PhasedMarkov::_order, _p_f, PhasedMarkov::_phase, PhasedMarkov::_prior_alpha, PhasedMarkov::_size, PrimaryCount::count_p_occurencies(), PrimaryCount::get_p_count(), PrimarySequenceSet< TSequence >::get_translator(), and select().
| 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.
| 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) |
References PhasedMarkov::_order, _p_f, PhasedMarkov::_phase, PhasedMarkov::_prior_alpha, PhasedMarkov::_size, PrimaryCount::count_p_occurencies(), PrimaryCount::get_p_count(), and select().
| 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.
| 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) |
References PhasedMarkov::_order, _p_f, PhasedMarkov::_phase, PhasedMarkov::_prior_alpha, PhasedMarkov::_size, and select().
| 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.
| 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) |
References PhasedMarkov::_nPi, PhasedMarkov::_order, _p_f, PhasedMarkov::_phase, PhasedMarkov::_prior_alpha, PhasedMarkov::_size, and select().
| 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.
| 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 |
References PhasedMarkov::_order, _p_f, PhasedMarkov::_phase, PhasedMarkov::_prior_alpha, and PhasedMarkov::_size.
| void PhasedPMarkov::select | ( | unsigned long ** | count, | |
| bool | decal_required, | |||
| const Translator & | trans = Translator(), |
|||
| const string & | xmlfile = string() | |||
| ) | [inline] |
performs the A Posteriori Maximisation
| 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) |
References PhasedMarkov::_jump, PhasedMarkov::_nb_param, _p_f, PhasedMarkov::_phase, PhasedMarkov::_Pis, and PhasedMarkov::_size.
Referenced by PhasedPMarkov().
| 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] |
| 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 |
References PhasedMarkov::_phase, and mean_post_log_likelihood().
| 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
| 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 |
References PhasedMarkov::_jump, _p_f, and PhasedMarkov::_phase.
| double PhasedPMarkov::mean_post_log_likelihood | ( | const TSeq & | tseq_eval, | |
| short | initial_phase_eval = 0 | |||
| ) | [inline] |
| tseq_eval | sequence(s) (set) for the evaluation step | |
| initial_phase_eval | phase of the first element of each sequence |
References PhasedMarkov::_phase, and mean_post_log_likelihood().
| 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
| 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 |
References PhasedMarkov::_jump, _p_f, and PhasedMarkov::_phase.
| double PhasedPMarkov::post_log_likelihood | ( | const TSeq & | tseq_eval, | |
| short | initial_phase_eval = 0 | |||
| ) | [inline] |
compute the mean posterior likelihood over the parameters
| tseq_eval | sequence(s) (set) for the evaluation step | |
| initial_phase_eval | phase of the first element of each sequence |
References PhasedMarkov::_order, and PhasedMarkov::_phase.
| double PhasedPMarkov::post_log_likelihood | ( | unsigned long ** | count_eval, | |
| bool | decal_required_e | |||
| ) | [inline] |
compute the mean posterior likelihood over the 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 |
References PhasedMarkov::_jump, _p_f, and PhasedMarkov::_phase.
| void PhasedPMarkov::draw | ( | unsigned long ** | count, | |
| bool | decal_required, | |||
| gsl_rng * | r, | |||
| const Translator & | trans = Translator(), |
|||
| const string & | xmlfile = string() | |||
| ) | [inline] |
draws a model
| 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) |
References PhasedMarkov::_jump, PhasedMarkov::_Mus, PhasedMarkov::_nb_param, _p_f, PhasedMarkov::_phase, PhasedMarkov::_Pis, PhasedMarkov::_size, and PhasedMarkov::compute_stat_laws().
| void PhasedPMarkov::draw | ( | gsl_rng * | r, | |
| const Translator & | trans = Translator(), |
|||
| const string & | xmlfile = string() | |||
| ) | [inline] |
draws a model
| r | random generator | |
| trans | a Translator is required for xml tree saving (if xml2 activated) | |
| xmlfile | xmlfile for tree saving (if xml2 activated) |
References PhasedMarkov::_Mus, PhasedMarkov::_nb_param, _p_f, PhasedMarkov::_phase, PhasedMarkov::_Pis, PhasedMarkov::_size, and PhasedMarkov::compute_stat_laws().
| Download seq++ 4.2.0 |
| Download previous versions |
| Statistique & Genome Home |
| Contributors : M.Baudry, P.Y.Bourguignon, M.Hoebeke, V.Miele, P.Nicolas, G.Nuel, H.Richard, D.Robelin |
1.5.6