The class vis_viterbi implements the viterbi algorithm given the weights of different labels, without hidden information. More...
#include <bioner.h>
Public Member Functions | |
vis_viterbi (const std::string &) | |
Constructor: Create dynammic storage for the best path. | |
std::vector< int > | find_best_path (double **, int) const |
find_best_path: perform viterbi algortihm given the weights matrix | |
Private Attributes | |
int | N |
N: number of classes. | |
std::vector< double > | p_ini |
p_ini: vector with initial probabilities for each class | |
std::vector< std::vector < double > > | p_trans |
p_trans: matrix with the probability transitions from one class to another |
The class vis_viterbi implements the viterbi algorithm given the weights of different labels, without hidden information.
vis_viterbi::vis_viterbi | ( | const std::string & | ) |
Constructor: Create dynammic storage for the best path.
vector< int > vis_viterbi::find_best_path | ( | double ** | predictions, | |
int | sent_size | |||
) | const |
find_best_path: perform viterbi algortihm given the weights matrix
References p_ini, p_trans, and TRACE.
Referenced by bioner::annotate().
int vis_viterbi::N [private] |
N: number of classes.
std::vector<double> vis_viterbi::p_ini [private] |
p_ini: vector with initial probabilities for each class
Referenced by find_best_path().
std::vector<std::vector<double> > vis_viterbi::p_trans [private] |
p_trans: matrix with the probability transitions from one class to another
Referenced by find_best_path().