Implements fitting of a two-step function to a number sequence. More...
#include <fitonoff.hh>
Public Member Functions | |
| FitOnOff (numseq_t &x_, double delta_01_, double delta_10_, double beta_) | |
| double | viterbi (double c0, double c1, bool traceback) | 
| double | best_once_on (double c0, double c1) | 
| pf_t | forward (double c0, double c1) | 
| std::pair< double, double > | optimize (double c0, double c1) | 
| void | write_viterbi_path_compact (std::ostream &out, double c0, double c1) | 
| writes the ranges in the viterbi path  | |
| void | write_viterbi_path (std::ostream &out, double c0, double c1) const | 
| writes the viterbi path  | |
| void | print_table (const std::string &name, const std::vector< bool > &v) const | 
| void | print_table (const std::string &name, const std::vector< pf_t > &v) const | 
| void | print_tables () const | 
Implements fitting of a two-step function to a number sequence.
| LocARNA::FitOnOff::FitOnOff | ( | numseq_t & | x_, | 
| double | delta_01_, | ||
| double | delta_10_, | ||
| double | beta_ | ||
| ) |  [inline] | 
        
construct with parameters
| x_ | number sequence that we want to fit | 
| delta_01_ | penalty for change from a to b | 
| delta_10_ | penalty for change from b to a | 
| beta_ | is the inverse temperature | 
| double LocARNA::FitOnOff::best_once_on | ( | double | c0, | 
| double | c1 | ||
| ) | 
best path that is "on" (=c1) exactly once
| c0 | off-value | 
| c1 | on-value | 
| pf_t LocARNA::FitOnOff::forward | ( | double | c0, | 
| double | c1 | ||
| ) | 
compute forward partition functions fills tables v
| std::pair< double, double > LocARNA::FitOnOff::optimize | ( | double | c0, | 
| double | c1 | ||
| ) | 
optimize c0 and c1 by gradient optimization
| void LocARNA::FitOnOff::print_table | ( | const std::string & | name, | 
| const std::vector< bool > & | v | ||
| ) | const | 
Print boolean vector to cout
| name | Identifier name to be printed | 
| v | Vector | 
| void LocARNA::FitOnOff::print_table | ( | const std::string & | name, | 
| const std::vector< pf_t > & | v | ||
| ) | const | 
Print vector of partition functions (pf_t) to cout
| name | Identifier name to be printed | 
| v | Vector | 
| void LocARNA::FitOnOff::print_tables | ( | ) | const | 
Print DP-tables for debugging to cout
| double LocARNA::FitOnOff::viterbi | ( | double | c0, | 
| double | c1, | ||
| bool | traceback | ||
| ) | 
compute the viterbi score (and optionally path) fills tables v, optionally compute t and trace
| c0 | off-value | 
| c1 | on-value | 
| traceback | whether to perform traceback | 
 1.7.6.1