公有成员 | 保护属性

CPluginEstimate类参考


详细描述

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

\[ f({\bf x})= \log(\mbox{Pr}({\bf x}|\theta_+)) - \log(\mbox{Pr}({\bf x}|\theta_-)) \]

参见:
CLinearHMM
CDistribution

在文件PluginEstimate.h34行定义。

继承图,类CPluginEstimate
Inheritance graph
[图例]

所有成员的列表。

公有成员

 CPluginEstimate (float64_t pos_pseudo=1e-10, float64_t neg_pseudo=1e-10)
virtual ~CPluginEstimate ()
virtual bool train (CFeatures *data=NULL)
CLabelsclassify ()
virtual CLabelsclassify (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
CLinearHMMpos_model
CLinearHMMneg_model
CStringFeatures< uint16_t > * features

构造及析构函数文档

CPluginEstimate ( float64_t  pos_pseudo = 1e-10,
float64_t  neg_pseudo = 1e-10 
)

default constructor

参数:
pos_pseudopseudo for positive model
neg_pseudopseudo for negative model

在文件PluginEstimate.cpp20行定义。

~CPluginEstimate (  ) [virtual]

在文件PluginEstimate.cpp26行定义。


成员函数文档

bool check_models (  )

check models

返回:
if one of the two models is invalid

在文件PluginEstimate.h201行定义。

CLabels * classify (  ) [virtual]

classify objects using the currently set features

返回:
classified labels

实现了CClassifier

在文件PluginEstimate.cpp81行定义。

CLabels * classify ( CFeatures data ) [virtual]

classify objects

参数:
data(test)data to be classified
返回:
classified labels

实现了CClassifier

在文件PluginEstimate.cpp93行定义。

float64_t classify_example ( int32_t  vec_idx ) [virtual]

classify the test feature vector indexed by vec_idx

重载CClassifier

在文件PluginEstimate.cpp108行定义。

virtual CStringFeatures<uint16_t>* get_features (  ) [virtual]

get features

返回:
features

在文件PluginEstimate.h82行定义。

bool get_model_params ( float64_t *&  pos_params,
float64_t *&  neg_params,
int32_t &  seq_length,
int32_t &  num_symbols 
)

get model parameters

参数:
pos_paramsparameters of positive model
neg_paramsparameters of negative model
seq_lengthsequence length
num_symbolsnumbe of symbols
返回:
if operation was successful

在文件PluginEstimate.h141行定义。

virtual const char* get_name (  ) const [virtual]
返回:
object name

实现了CSGObject

在文件PluginEstimate.h207行定义。

int32_t get_num_params (  )

get number of parameters

返回:
number of parameters

在文件PluginEstimate.h192行定义。

float64_t get_parameterwise_log_odds ( uint16_t  obs,
int32_t  position 
)

get log odds parameter-wise

参数:
obsobservation
positionposition
返回:
log odd at position

在文件PluginEstimate.h105行定义。

float64_t log_derivative_neg_obsolete ( uint16_t  obs,
int32_t  pos 
)

get obsolete negative log derivative

参数:
obsobservation
posposition
返回:
negative log derivative

在文件PluginEstimate.h128行定义。

float64_t log_derivative_pos_obsolete ( uint16_t  obs,
int32_t  pos 
)

get obsolete positive log derivative

参数:
obsobservation
posposition
返回:
positive log derivative

在文件PluginEstimate.h117行定义。

float64_t posterior_log_odds_obsolete ( uint16_t *  vector,
int32_t  len 
)

obsolete posterior log odds

参数:
vectorvector
lenlen
返回:
something floaty

在文件PluginEstimate.h93行定义。

virtual void set_features ( CStringFeatures< uint16_t > *  feat ) [virtual]

set features

参数:
featfeatures to set

在文件PluginEstimate.h71行定义。

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_paramsparameters of positive model
neg_paramsparameters of negative model
seq_lengthsequence length
num_symbolsnumbe of symbols

在文件PluginEstimate.h169行定义。

bool train ( CFeatures data = NULL ) [virtual]

train plugin estimate classifier

参数:
datatraining data (parameter can be avoided if distance or kernel-based classifiers are used and distance/kernels are initialized with train data)
返回:
whether training was successful

重载CClassifier

在文件PluginEstimate.cpp34行定义。


成员数据文档

CStringFeatures<uint16_t>* features [protected]

features

在文件PluginEstimate.h221行定义。

float64_t m_neg_pseudo [protected]

pseudo count for negative class

在文件PluginEstimate.h213行定义。

float64_t m_pos_pseudo [protected]

pseudo count for positive class

在文件PluginEstimate.h211行定义。

CLinearHMM* neg_model [protected]

negative model

在文件PluginEstimate.h218行定义。

CLinearHMM* pos_model [protected]

positive model

在文件PluginEstimate.h216行定义。


该类的文档由以下文件生成:

SHOGUN Machine Learning Toolbox - Documentation