Definition at line 20 of file PluginEstimate.h.
Public Member Functions | |
CPluginEstimate (DREAL pos_pseudo=1e-10, DREAL neg_pseudo=1e-10) | |
virtual | ~CPluginEstimate () |
bool | train () |
CLabels * | classify (CLabels *output=NULL) |
classify all test features | |
virtual void | set_features (CStringFeatures< WORD > *feat) |
virtual CStringFeatures< WORD > * | get_features () |
DREAL | classify_example (INT vec_idx) |
classify the test feature vector indexed by vec_idx | |
DREAL | posterior_log_odds_obsolete (WORD *vector, INT len) |
DREAL | get_parameterwise_log_odds (WORD obs, INT position) |
DREAL | log_derivative_pos_obsolete (WORD obs, INT pos) |
DREAL | log_derivative_neg_obsolete (WORD obs, INT pos) |
bool | get_model_params (DREAL *&pos_params, DREAL *&neg_params, INT &seq_length, INT &num_symbols) |
void | set_model_params (const DREAL *pos_params, const DREAL *neg_params, INT seq_length, INT num_symbols) |
INT | get_num_params () |
bool | check_models () |
virtual bool | load (FILE *srcfile) |
virtual bool | save (FILE *dstfile) |
virtual void | set_labels (CLabels *lab) |
virtual CLabels * | get_labels () |
virtual DREAL | get_label (INT i) |
void | set_max_train_time (DREAL t) |
DREAL | get_max_train_time () |
virtual EClassifierType | get_classifier_type () |
Static Public Attributes | |
static CParallel | parallel |
static CIO | io |
static CVersion | version |
Protected Attributes | |
DREAL | m_pos_pseudo |
DREAL | m_neg_pseudo |
CLinearHMM * | pos_model |
CLinearHMM * | neg_model |
CStringFeatures< WORD > * | features |
DREAL | max_train_time |
CLabels * | labels |
default constructor
pos_pseudo | pseudo for positive model | |
neg_pseudo | pseudo for negative model |
Definition at line 19 of file PluginEstimate.cpp.
CPluginEstimate::~CPluginEstimate | ( | ) | [virtual] |
Definition at line 25 of file PluginEstimate.cpp.
bool CPluginEstimate::train | ( | ) | [virtual] |
train the estimate
Reimplemented from CClassifier.
Definition at line 33 of file PluginEstimate.cpp.
classify all test features
Reimplemented from CClassifier.
Definition at line 70 of file PluginEstimate.cpp.
virtual void CPluginEstimate::set_features | ( | CStringFeatures< WORD > * | feat | ) | [virtual] |
virtual CStringFeatures<WORD>* CPluginEstimate::get_features | ( | ) | [virtual] |
classify the test feature vector indexed by vec_idx
Reimplemented from CClassifier.
Definition at line 84 of file PluginEstimate.cpp.
obsolete posterior log odds
vector | vector | |
len | len |
Definition at line 65 of file PluginEstimate.h.
get log odds parameter-wise
obs | observation | |
position | position |
Definition at line 76 of file PluginEstimate.h.
get obsolete positive log derivative
obs | observation | |
pos | position |
Definition at line 87 of file PluginEstimate.h.
get obsolete negative log derivative
obs | observation | |
pos | position |
Definition at line 98 of file PluginEstimate.h.
bool CPluginEstimate::get_model_params | ( | DREAL *& | pos_params, | |
DREAL *& | neg_params, | |||
INT & | seq_length, | |||
INT & | 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 |
Definition at line 111 of file PluginEstimate.h.
void CPluginEstimate::set_model_params | ( | const DREAL * | pos_params, | |
const DREAL * | neg_params, | |||
INT | seq_length, | |||
INT | 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 |
Definition at line 137 of file PluginEstimate.h.
INT CPluginEstimate::get_num_params | ( | ) |
get number of parameters
Definition at line 158 of file PluginEstimate.h.
bool CPluginEstimate::check_models | ( | ) |
check models
Definition at line 167 of file PluginEstimate.h.
virtual bool CClassifier::load | ( | FILE * | srcfile | ) | [virtual, inherited] |
load Classifier from file
abstract base method
srcfile | file to load from |
Reimplemented in CKernelPerceptron, CKNN, CLinearClassifier, CSVM, CHierarchical, and CKMeans.
Definition at line 56 of file Classifier.h.
virtual bool CClassifier::save | ( | FILE * | dstfile | ) | [virtual, inherited] |
save Classifier to file
abstract base method
dstfile | file to save to |
Reimplemented in CKernelPerceptron, CKNN, CLinearClassifier, CSVM, CHierarchical, and CKMeans.
Definition at line 65 of file Classifier.h.
virtual void CClassifier::set_labels | ( | CLabels * | lab | ) | [virtual, inherited] |
virtual CLabels* CClassifier::get_labels | ( | ) | [virtual, inherited] |
get one specific label
i | index of label to get |
Definition at line 89 of file Classifier.h.
void CClassifier::set_max_train_time | ( | DREAL | t | ) | [inherited] |
set maximum training time
t | maximimum training time |
Definition at line 95 of file Classifier.h.
DREAL CClassifier::get_max_train_time | ( | ) | [inherited] |
get maximum training time
Definition at line 101 of file Classifier.h.
virtual EClassifierType CClassifier::get_classifier_type | ( | ) | [virtual, inherited] |
get classifier type
Reimplemented in CKernelPerceptron, CKNN, CPerceptron, CGMNPSVM, CGNPPSVM, CGPBTSVM, CLibSVM, CLibSVMMultiClass, CLibSVMOneClass, CMPDSVM, CSubGradientSVM, CSVMLin, CSVMOcas, CSVMSGD, CWDSVMOcas, CHierarchical, CKMeans, and CLibSVR.
Definition at line 107 of file Classifier.h.
DREAL CPluginEstimate::m_pos_pseudo [protected] |
pseudo count for positive class
Definition at line 174 of file PluginEstimate.h.
DREAL CPluginEstimate::m_neg_pseudo [protected] |
pseudo count for negative class
Definition at line 176 of file PluginEstimate.h.
CLinearHMM* CPluginEstimate::pos_model [protected] |
positive model
Definition at line 179 of file PluginEstimate.h.
CLinearHMM* CPluginEstimate::neg_model [protected] |
negative model
Definition at line 181 of file PluginEstimate.h.
CStringFeatures<WORD>* CPluginEstimate::features [protected] |
features
Definition at line 184 of file PluginEstimate.h.
DREAL CClassifier::max_train_time [protected, inherited] |
maximum training time
Definition at line 111 of file Classifier.h.
CLabels* CClassifier::labels [protected, inherited] |
labels
Definition at line 114 of file Classifier.h.
CParallel CSGObject::parallel [static, inherited] |
Definition at line 105 of file SGObject.h.
CIO CSGObject::io [static, inherited] |
Definition at line 106 of file SGObject.h.
CVersion CSGObject::version [static, inherited] |
Definition at line 107 of file SGObject.h.