class PluginEstimate
The class PluginEstimate takes as input two probabilistic models (of type CLinearHMM, even though general models are possible ) and classifies examples according to the rule
在文件PluginEstimate.h第34行定义。
公有成员 | |
CPluginEstimate (float64_t pos_pseudo=1e-10, float64_t neg_pseudo=1e-10) | |
virtual | ~CPluginEstimate () |
virtual bool | train (CFeatures *data=NULL) |
CLabels * | classify () |
virtual CLabels * | classify (CFeatures *data) |
virtual void | set_features (CStringFeatures< uint16_t > *feat) |
virtual CStringFeatures < uint16_t > * | get_features () |
float64_t | classify_example (int32_t vec_idx) |
classify the test feature vector indexed by vec_idx | |
float64_t | posterior_log_odds_obsolete (uint16_t *vector, int32_t len) |
float64_t | get_parameterwise_log_odds (uint16_t obs, int32_t position) |
float64_t | log_derivative_pos_obsolete (uint16_t obs, int32_t pos) |
float64_t | log_derivative_neg_obsolete (uint16_t obs, int32_t pos) |
bool | get_model_params (float64_t *&pos_params, float64_t *&neg_params, int32_t &seq_length, int32_t &num_symbols) |
void | set_model_params (const float64_t *pos_params, const float64_t *neg_params, int32_t seq_length, int32_t num_symbols) |
int32_t | get_num_params () |
bool | check_models () |
virtual const char * | get_name () const |
保护属性 | |
float64_t | m_pos_pseudo |
float64_t | m_neg_pseudo |
CLinearHMM * | pos_model |
CLinearHMM * | neg_model |
CStringFeatures< uint16_t > * | features |
CPluginEstimate | ( | float64_t | pos_pseudo = 1e-10 , |
|
float64_t | neg_pseudo = 1e-10 | |||
) |
default constructor
pos_pseudo | pseudo for positive model | |
neg_pseudo | pseudo for negative model |
在文件PluginEstimate.cpp第20行定义。
~CPluginEstimate | ( | ) | [virtual] |
在文件PluginEstimate.cpp第26行定义。
bool check_models | ( | ) |
CLabels * classify | ( | ) | [virtual] |
classify objects using the currently set features
实现了CClassifier。
在文件PluginEstimate.cpp第81行定义。
classify objects
data | (test)data to be classified |
实现了CClassifier。
在文件PluginEstimate.cpp第93行定义。
float64_t classify_example | ( | int32_t | vec_idx | ) | [virtual] |
virtual CStringFeatures<uint16_t>* get_features | ( | ) | [virtual] |
bool get_model_params | ( | float64_t *& | pos_params, | |
float64_t *& | neg_params, | |||
int32_t & | seq_length, | |||
int32_t & | num_symbols | |||
) |
get model parameters
pos_params | parameters of positive model | |
neg_params | parameters of negative model | |
seq_length | sequence length | |
num_symbols | numbe of symbols |
在文件PluginEstimate.h第141行定义。
virtual const char* get_name | ( | ) | const [virtual] |
int32_t get_num_params | ( | ) |
float64_t get_parameterwise_log_odds | ( | uint16_t | obs, | |
int32_t | position | |||
) |
get log odds parameter-wise
obs | observation | |
position | position |
在文件PluginEstimate.h第105行定义。
float64_t log_derivative_neg_obsolete | ( | uint16_t | obs, | |
int32_t | pos | |||
) |
get obsolete negative log derivative
obs | observation | |
pos | position |
在文件PluginEstimate.h第128行定义。
float64_t log_derivative_pos_obsolete | ( | uint16_t | obs, | |
int32_t | pos | |||
) |
get obsolete positive log derivative
obs | observation | |
pos | position |
在文件PluginEstimate.h第117行定义。
float64_t posterior_log_odds_obsolete | ( | uint16_t * | vector, | |
int32_t | len | |||
) |
obsolete posterior log odds
vector | vector | |
len | len |
在文件PluginEstimate.h第93行定义。
virtual void set_features | ( | CStringFeatures< uint16_t > * | feat | ) | [virtual] |
void set_model_params | ( | const float64_t * | pos_params, | |
const float64_t * | neg_params, | |||
int32_t | seq_length, | |||
int32_t | num_symbols | |||
) |
set model parameters
pos_params | parameters of positive model | |
neg_params | parameters of negative model | |
seq_length | sequence length | |
num_symbols | numbe of symbols |
在文件PluginEstimate.h第169行定义。
bool train | ( | CFeatures * | data = NULL |
) | [virtual] |
train plugin estimate classifier
data | training data (parameter can be avoided if distance or kernel-based classifiers are used and distance/kernels are initialized with train data) |
重载CClassifier。
在文件PluginEstimate.cpp第34行定义。
CStringFeatures<uint16_t>* features [protected] |
features
在文件PluginEstimate.h第221行定义。
float64_t m_neg_pseudo [protected] |
pseudo count for negative class
在文件PluginEstimate.h第213行定义。
float64_t m_pos_pseudo [protected] |
pseudo count for positive class
在文件PluginEstimate.h第211行定义。
CLinearHMM* neg_model [protected] |
negative model
在文件PluginEstimate.h第218行定义。
CLinearHMM* pos_model [protected] |
positive model
在文件PluginEstimate.h第216行定义。