SHOGUN v0.9.0
公有成员 | 保护属性
CPerceptron类参考

详细描述

Class Perceptron implements the standard linear (online) perceptron.

Given a maximum number of iterations (the standard perceptron algorithm is not guaranteed to converge) and a fixed lerning rate, the result is a linear classifier.

参见:
CLinearClassifier
http://en.wikipedia.org/wiki/Perceptron

在文件Perceptron.h30行定义。

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

所有成员的列表。

公有成员

 CPerceptron ()
 CPerceptron (CDotFeatures *traindat, CLabels *trainlab)
virtual ~CPerceptron ()
virtual EClassifierType get_classifier_type ()
virtual bool train (CFeatures *data=NULL)
void set_learn_rate (float64_t r)
 set learn rate of gradient descent training algorithm
void set_max_iter (int32_t i)
 set maximum number of iterations
virtual const char * get_name () const

保护属性

float64_t learn_rate
int32_t max_iter

构造及析构函数文档

default constructor

在文件Perceptron.cpp17行定义。

CPerceptron ( CDotFeatures traindat,
CLabels trainlab 
)

constructor

参数:
traindattraining features
trainlablabels for training features

在文件Perceptron.cpp22行定义。

~CPerceptron ( ) [virtual]

在文件Perceptron.cpp29行定义。


成员函数文档

virtual EClassifierType get_classifier_type ( ) [virtual]

get classifier type

返回:
classifier type PERCEPTRON

重载CClassifier

在文件Perceptron.h48行定义。

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

重载CLinearClassifier

在文件Perceptron.h73行定义。

void set_learn_rate ( float64_t  r)

set learn rate of gradient descent training algorithm

在文件Perceptron.h61行定义。

void set_max_iter ( int32_t  i)

set maximum number of iterations

在文件Perceptron.h67行定义。

bool train ( CFeatures data = NULL) [virtual]

train 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

在文件Perceptron.cpp33行定义。


成员数据文档

float64_t learn_rate [protected]

learning rate

在文件Perceptron.h77行定义。

int32_t max_iter [protected]

maximum number of iterations

在文件Perceptron.h79行定义。


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

SHOGUN Machine Learning Toolbox - Documentation