CPluginEstimate Class Reference

Inheritance diagram for CPluginEstimate:

Inheritance graph
[legend]

List of all members.


Detailed Description

class PluginEstimate

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 ()
CLabelsclassify (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 CLabelsget_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
CLinearHMMpos_model
CLinearHMMneg_model
CStringFeatures< WORD > * features
DREAL max_train_time
CLabelslabels

Constructor & Destructor Documentation

CPluginEstimate::CPluginEstimate ( DREAL  pos_pseudo = 1e-10,
DREAL  neg_pseudo = 1e-10 
)

default constructor

Parameters:
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.


Member Function Documentation

bool CPluginEstimate::train (  )  [virtual]

train the estimate

Returns:
if training was successful

Reimplemented from CClassifier.

Definition at line 33 of file PluginEstimate.cpp.

CLabels * CPluginEstimate::classify ( CLabels output = NULL  )  [virtual]

classify all test features

Reimplemented from CClassifier.

Definition at line 70 of file PluginEstimate.cpp.

virtual void CPluginEstimate::set_features ( CStringFeatures< WORD > *  feat  )  [virtual]

set features

Parameters:
feat features to set

Definition at line 43 of file PluginEstimate.h.

virtual CStringFeatures<WORD>* CPluginEstimate::get_features (  )  [virtual]

get features

Returns:
features

Definition at line 54 of file PluginEstimate.h.

DREAL CPluginEstimate::classify_example ( INT  vec_idx  )  [virtual]

classify the test feature vector indexed by vec_idx

Reimplemented from CClassifier.

Definition at line 84 of file PluginEstimate.cpp.

DREAL CPluginEstimate::posterior_log_odds_obsolete ( WORD vector,
INT  len 
)

obsolete posterior log odds

Parameters:
vector vector
len len
Returns:
something floaty

Definition at line 65 of file PluginEstimate.h.

DREAL CPluginEstimate::get_parameterwise_log_odds ( WORD  obs,
INT  position 
)

get log odds parameter-wise

Parameters:
obs observation
position position
Returns:
log odd at position

Definition at line 76 of file PluginEstimate.h.

DREAL CPluginEstimate::log_derivative_pos_obsolete ( WORD  obs,
INT  pos 
)

get obsolete positive log derivative

Parameters:
obs observation
pos position
Returns:
positive log derivative

Definition at line 87 of file PluginEstimate.h.

DREAL CPluginEstimate::log_derivative_neg_obsolete ( WORD  obs,
INT  pos 
)

get obsolete negative log derivative

Parameters:
obs observation
pos position
Returns:
negative log derivative

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

Parameters:
pos_params parameters of positive model
neg_params parameters of negative model
seq_length sequence length
num_symbols numbe of symbols
Returns:
if operation was successful

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

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

Returns:
number of parameters

Definition at line 158 of file PluginEstimate.h.

bool CPluginEstimate::check_models (  ) 

check models

Returns:
if one of the two models is invalid

Definition at line 167 of file PluginEstimate.h.

virtual bool CClassifier::load ( FILE *  srcfile  )  [virtual, inherited]

load Classifier from file

abstract base method

Parameters:
srcfile file to load from
Returns:
failure

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

Parameters:
dstfile file to save to
Returns:
failure

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]

set labels

Parameters:
lab labels

Definition at line 71 of file Classifier.h.

virtual CLabels* CClassifier::get_labels (  )  [virtual, inherited]

get labels

Returns:
labels

Definition at line 82 of file Classifier.h.

virtual DREAL CClassifier::get_label ( INT  i  )  [virtual, inherited]

get one specific label

Parameters:
i index of label to get
Returns:
value of label at index i

Definition at line 89 of file Classifier.h.

void CClassifier::set_max_train_time ( DREAL  t  )  [inherited]

set maximum training time

Parameters:
t maximimum training time

Definition at line 95 of file Classifier.h.

DREAL CClassifier::get_max_train_time (  )  [inherited]

get maximum training time

Returns:
maximum training time

Definition at line 101 of file Classifier.h.

virtual EClassifierType CClassifier::get_classifier_type (  )  [virtual, inherited]

get classifier type

Returns:
classifier type NONE

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.


Member Data Documentation

pseudo count for positive class

Definition at line 174 of file PluginEstimate.h.

pseudo count for negative class

Definition at line 176 of file PluginEstimate.h.

positive model

Definition at line 179 of file PluginEstimate.h.

negative model

Definition at line 181 of file PluginEstimate.h.

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.


The documentation for this class was generated from the following files:

SHOGUN Machine Learning Toolbox - Documentation