Implements fitting of a two-step function to a number sequence.
More...
#include <fitonoff.hh>
|
| FitOnOff (numseq_t &x_, double delta_, 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 |
|
|
virtual double | delta (int i) const |
|
virtual double | exp_delta (int i) const |
|
Implements fitting of a two-step function to a number sequence.
◆ FitOnOff()
LocARNA::FitOnOff::FitOnOff |
( |
numseq_t & |
x_, |
|
|
double |
delta_, |
|
|
double |
beta_ |
|
) |
| |
|
inline |
construct with parameters
- Parameters
-
x_ | number sequence that we want to fit |
delta_ | penalty for change between a and b |
beta_ | is the inverse temperature |
◆ best_once_on()
double LocARNA::FitOnOff::best_once_on |
( |
double |
c0, |
|
|
double |
c1 |
|
) |
| |
best path that is "on" (=c1) exactly once
- Parameters
-
- Returns
- score of best path post: best path is in trace
◆ forward()
pf_t LocARNA::FitOnOff::forward |
( |
double |
c0, |
|
|
double |
c1 |
|
) |
| |
compute forward partition functions fills tables v
◆ optimize()
std::pair< double, double > LocARNA::FitOnOff::optimize |
( |
double |
c0, |
|
|
double |
c1 |
|
) |
| |
optimize c0 and c1 by gradient optimization
- Returns
- optimal c0 and c1
◆ print_table() [1/2]
void LocARNA::FitOnOff::print_table |
( |
const std::string & |
name, |
|
|
const std::vector< bool > & |
v |
|
) |
| const |
Print boolean vector to cout
- Parameters
-
name | Identifier name to be printed |
v | Vector |
◆ print_table() [2/2]
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
- Parameters
-
name | Identifier name to be printed |
v | Vector |
◆ print_tables()
void LocARNA::FitOnOff::print_tables |
( |
| ) |
const |
Print DP-tables for debugging to cout
- See also
- print_table()
◆ viterbi()
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
- Parameters
-
c0 | off-value |
c1 | on-value |
traceback | whether to perform traceback |
The documentation for this class was generated from the following files: