OpenCV  2.4.13.2
Open Source Computer Vision
CvANN_MLP Class Reference

#include <ml.hpp>

Inheritance diagram for CvANN_MLP:
CvStatModel

Public Types

enum  { IDENTITY = 0, SIGMOID_SYM = 1, GAUSSIAN = 2 }
 
enum  { UPDATE_WEIGHTS = 1, NO_INPUT_SCALE = 2, NO_OUTPUT_SCALE = 4 }
 

Public Member Functions

 CvANN_MLP ()
 
 CvANN_MLP (const CvMat *layerSizes, int activateFunc=CvANN_MLP::SIGMOID_SYM, double fparam1=0, double fparam2=0)
 
virtual ~CvANN_MLP ()
 
virtual void create (const CvMat *layerSizes, int activateFunc=CvANN_MLP::SIGMOID_SYM, double fparam1=0, double fparam2=0)
 
virtual int train (const CvMat *inputs, const CvMat *outputs, const CvMat *sampleWeights, const CvMat *sampleIdx=0, CvANN_MLP_TrainParams params=CvANN_MLP_TrainParams(), int flags=0)
 
virtual float predict (const CvMat *inputs, CV_OUT CvMat *outputs) const
 
 CvANN_MLP (const cv::Mat &layerSizes, int activateFunc=CvANN_MLP::SIGMOID_SYM, double fparam1=0, double fparam2=0)
 
virtual void create (const cv::Mat &layerSizes, int activateFunc=CvANN_MLP::SIGMOID_SYM, double fparam1=0, double fparam2=0)
 
virtual int train (const cv::Mat &inputs, const cv::Mat &outputs, const cv::Mat &sampleWeights, const cv::Mat &sampleIdx=cv::Mat(), CvANN_MLP_TrainParams params=CvANN_MLP_TrainParams(), int flags=0)
 
virtual float predict (const cv::Mat &inputs, CV_OUT cv::Mat &outputs) const
 
virtual void clear ()
 
virtual void read (CvFileStorage *fs, CvFileNode *node)
 
virtual void write (CvFileStorage *storage, const char *name) const
 
int get_layer_count ()
 
const CvMatget_layer_sizes ()
 
double * get_weights (int layer)
 
virtual void calc_activ_func_deriv (CvMat *xf, CvMat *deriv, const double *bias) const
 
- Public Member Functions inherited from CvStatModel
 CvStatModel ()
 
virtual ~CvStatModel ()
 
virtual void save (const char *filename, const char *name=0) const
 
virtual void load (const char *filename, const char *name=0)
 

Protected Member Functions

virtual bool prepare_to_train (const CvMat *_inputs, const CvMat *_outputs, const CvMat *_sample_weights, const CvMat *sampleIdx, CvVectors *_ivecs, CvVectors *_ovecs, double **_sw, int _flags)
 
virtual int train_backprop (CvVectors _ivecs, CvVectors _ovecs, const double *_sw)
 
virtual int train_rprop (CvVectors _ivecs, CvVectors _ovecs, const double *_sw)
 
virtual void calc_activ_func (CvMat *xf, const double *bias) const
 
virtual void set_activ_func (int _activ_func=SIGMOID_SYM, double _f_param1=0, double _f_param2=0)
 
virtual void init_weights ()
 
virtual void scale_input (const CvMat *_src, CvMat *_dst) const
 
virtual void scale_output (const CvMat *_src, CvMat *_dst) const
 
virtual void calc_input_scale (const CvVectors *vecs, int flags)
 
virtual void calc_output_scale (const CvVectors *vecs, int flags)
 
virtual void write_params (CvFileStorage *fs) const
 
virtual void read_params (CvFileStorage *fs, CvFileNode *node)
 

Protected Attributes

CvMatlayer_sizes
 
CvMatwbuf
 
CvMatsample_weights
 
double ** weights
 
double f_param1
 
double f_param2
 
double min_val
 
double max_val
 
double min_val1
 
double max_val1
 
int activ_func
 
int max_count
 
int max_buf_sz
 
CvANN_MLP_TrainParams params
 
cv::RNGrng
 
- Protected Attributes inherited from CvStatModel
const char * default_model_name
 

Member Enumeration Documentation

§ anonymous enum

anonymous enum
Enumerator
IDENTITY 
SIGMOID_SYM 
GAUSSIAN 

§ anonymous enum

anonymous enum
Enumerator
UPDATE_WEIGHTS 
NO_INPUT_SCALE 
NO_OUTPUT_SCALE 

Constructor & Destructor Documentation

§ CvANN_MLP() [1/3]

CvANN_MLP::CvANN_MLP ( )

§ CvANN_MLP() [2/3]

CvANN_MLP::CvANN_MLP ( const CvMat layerSizes,
int  activateFunc = CvANN_MLP::SIGMOID_SYM,
double  fparam1 = 0,
double  fparam2 = 0 
)

§ ~CvANN_MLP()

virtual CvANN_MLP::~CvANN_MLP ( )
virtual

§ CvANN_MLP() [3/3]

CvANN_MLP::CvANN_MLP ( const cv::Mat layerSizes,
int  activateFunc = CvANN_MLP::SIGMOID_SYM,
double  fparam1 = 0,
double  fparam2 = 0 
)

Member Function Documentation

§ calc_activ_func()

virtual void CvANN_MLP::calc_activ_func ( CvMat xf,
const double *  bias 
) const
protectedvirtual

§ calc_activ_func_deriv()

virtual void CvANN_MLP::calc_activ_func_deriv ( CvMat xf,
CvMat deriv,
const double *  bias 
) const
virtual

§ calc_input_scale()

virtual void CvANN_MLP::calc_input_scale ( const CvVectors vecs,
int  flags 
)
protectedvirtual

§ calc_output_scale()

virtual void CvANN_MLP::calc_output_scale ( const CvVectors vecs,
int  flags 
)
protectedvirtual

§ clear()

virtual void CvANN_MLP::clear ( )
virtual

Reimplemented from CvStatModel.

§ create() [1/2]

virtual void CvANN_MLP::create ( const CvMat layerSizes,
int  activateFunc = CvANN_MLP::SIGMOID_SYM,
double  fparam1 = 0,
double  fparam2 = 0 
)
virtual

§ create() [2/2]

virtual void CvANN_MLP::create ( const cv::Mat layerSizes,
int  activateFunc = CvANN_MLP::SIGMOID_SYM,
double  fparam1 = 0,
double  fparam2 = 0 
)
virtual

§ get_layer_count()

int CvANN_MLP::get_layer_count ( )
inline

§ get_layer_sizes()

const CvMat* CvANN_MLP::get_layer_sizes ( )
inline

§ get_weights()

double* CvANN_MLP::get_weights ( int  layer)
inline

§ init_weights()

virtual void CvANN_MLP::init_weights ( )
protectedvirtual

§ predict() [1/2]

virtual float CvANN_MLP::predict ( const CvMat inputs,
CV_OUT CvMat outputs 
) const
virtual

§ predict() [2/2]

virtual float CvANN_MLP::predict ( const cv::Mat inputs,
CV_OUT cv::Mat outputs 
) const
virtual

§ prepare_to_train()

virtual bool CvANN_MLP::prepare_to_train ( const CvMat _inputs,
const CvMat _outputs,
const CvMat _sample_weights,
const CvMat sampleIdx,
CvVectors _ivecs,
CvVectors _ovecs,
double **  _sw,
int  _flags 
)
protectedvirtual

§ read()

virtual void CvANN_MLP::read ( CvFileStorage fs,
CvFileNode node 
)
virtual

Reimplemented from CvStatModel.

§ read_params()

virtual void CvANN_MLP::read_params ( CvFileStorage fs,
CvFileNode node 
)
protectedvirtual

§ scale_input()

virtual void CvANN_MLP::scale_input ( const CvMat _src,
CvMat _dst 
) const
protectedvirtual

§ scale_output()

virtual void CvANN_MLP::scale_output ( const CvMat _src,
CvMat _dst 
) const
protectedvirtual

§ set_activ_func()

virtual void CvANN_MLP::set_activ_func ( int  _activ_func = SIGMOID_SYM,
double  _f_param1 = 0,
double  _f_param2 = 0 
)
protectedvirtual

§ train() [1/2]

virtual int CvANN_MLP::train ( const CvMat inputs,
const CvMat outputs,
const CvMat sampleWeights,
const CvMat sampleIdx = 0,
CvANN_MLP_TrainParams  params = CvANN_MLP_TrainParams(),
int  flags = 0 
)
virtual

§ train() [2/2]

virtual int CvANN_MLP::train ( const cv::Mat inputs,
const cv::Mat outputs,
const cv::Mat sampleWeights,
const cv::Mat sampleIdx = cv::Mat(),
CvANN_MLP_TrainParams  params = CvANN_MLP_TrainParams(),
int  flags = 0 
)
virtual

§ train_backprop()

virtual int CvANN_MLP::train_backprop ( CvVectors  _ivecs,
CvVectors  _ovecs,
const double *  _sw 
)
protectedvirtual

§ train_rprop()

virtual int CvANN_MLP::train_rprop ( CvVectors  _ivecs,
CvVectors  _ovecs,
const double *  _sw 
)
protectedvirtual

§ write()

virtual void CvANN_MLP::write ( CvFileStorage storage,
const char *  name 
) const
virtual

Reimplemented from CvStatModel.

§ write_params()

virtual void CvANN_MLP::write_params ( CvFileStorage fs) const
protectedvirtual

Member Data Documentation

§ activ_func

int CvANN_MLP::activ_func
protected

§ f_param1

double CvANN_MLP::f_param1
protected

§ f_param2

double CvANN_MLP::f_param2
protected

§ layer_sizes

CvMat* CvANN_MLP::layer_sizes
protected

§ max_buf_sz

int CvANN_MLP::max_buf_sz
protected

§ max_count

int CvANN_MLP::max_count
protected

§ max_val

double CvANN_MLP::max_val
protected

§ max_val1

double CvANN_MLP::max_val1
protected

§ min_val

double CvANN_MLP::min_val
protected

§ min_val1

double CvANN_MLP::min_val1
protected

§ params

CvANN_MLP_TrainParams CvANN_MLP::params
protected

§ rng

cv::RNG* CvANN_MLP::rng
protected

§ sample_weights

CvMat* CvANN_MLP::sample_weights
protected

§ wbuf

CvMat* CvANN_MLP::wbuf
protected

§ weights

double** CvANN_MLP::weights
protected

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