lemga Namespace Reference

Learning models and generic algorithms. More...


Classes

class  AdaBoost
 AdaBoost (adaptive boosting). More...
class  AdaBoost_ECOC
 AdaBoost.ECC with exponential cost and Hamming distance. More...
class  Aggregating
 An abstract class for aggregating. More...
class  Bagging
 Bagging (boostrap aggregating). More...
class  Boosting
 Boosting generates a linear combination of hypotheses. More...
struct  _boost_gd
class  Cascade
 Aggregate hypotheses in a cascade (sequential) way. More...
class  CGBoost
 CGBoost (Conjugate Gradient Boosting). More...
struct  _boost_cg
class  DataFeeder
 Feed (random splitted) training and testing data. More...
class  dataset
 Class template for storing, retrieving, and manipulating a vector of input-output style data. More...
class  FeedForwardNN
class  LearnModel
 A unified interface for learning models. More...
class  LPBoost
 LPBoost (Linear-Programming Boosting). More...
struct  MgnCost
 Cost proxy used in MgnBoost. More...
class  MgnBoost
 MgnBoost (margin maximizing boosting). More...
struct  _mgn_gd
class  MultiClass_ECOC
 Multiclass classification using error-correcting output code. More...
class  NNLayer
 A layer in a neural network. More...
struct  _search
 Interface used in iterative optimization algorithms. More...
struct  _gradient_descent
 Gradient descent. More...
struct  _gd_weightdecay
 Gradient descent with weight decay. More...
struct  _gd_momentum
 Gradient descent with momentum. More...
struct  _gd_adaptive
struct  _line_search
struct  _conjugate_gradient
class  Perceptron
 Perceptron models a type of artificial neural network that consists of only one neuron, invented by Frank Rosenblatt in 1957. More...
class  Pulse
 Multi-transition pulse functions (step functions). More...
class  Stump
 Decision stump. More...
class  SVM

Namespaces

namespace  cost
namespace  details
namespace  kernel
namespace  op
 Operators used in optimization.

Typedefs

typedef std::vector< std::vector<
REAL > > 
WMAT
typedef std::vector< DataWgtJointWgt
typedef const_shared_ptr<
JointWgt
pJointWgt
typedef var_shared_ptr< LearnModelpLearnModel
typedef std::vector< REALInput
typedef std::vector< REALOutput
typedef dataset< Input, OutputDataSet
typedef std::vector< REALDataWgt
typedef const_shared_ptr<
DataSet
pDataSet
typedef const_shared_ptr<
DataWgt
pDataWgt
typedef std::vector< int > ECOC_VECTOR
typedef std::vector< ECOC_VECTORECOC_TABLE
typedef std::map< REAL, REAL
>::iterator 
MI
typedef svm_node * p_svm_node

Enumerations

enum  ECOC_TYPE { ONE_VS_ONE, ONE_VS_ALL }

Functions

DataSetload_data (std::istream &, UINT, UINT, UINT)
 Load a data set from a stream.
DataSetload_data (std::istream &is, UINT n)
template<class SEARCH>
void iterative_optimize (SEARCH s)
 Main search routine.
bool ldivide (RMAT &A, const RVEC &b, RVEC &x)
void update_wgt (RVEC &wgt, const RVEC &dir, const RMAT &X, const RVEC &y)
void dset_extract (const pDataSet &ptd, RMAT &X, RVEC &y)
void dset_mult_wgt (const pDataWgt &ptw, RVEC &y)
UINT randcdf (REAL r, const RVEC &cdf)
bool ldivide (std::vector< std::vector< REAL > > &A, const std::vector< REAL > &b, std::vector< REAL > &x)
p_svm_node fill_svm_node (const Input &x, struct svm_node *pool)

Variables

const kernel::RBF _svm_ker (0.5)


Detailed Description

Learning models and generic algorithms.

The idea is to separate the learning model and optimization techniques.

Using vectorop.h for default vector operation

Todo:
documentation: basic idea, ...


Typedef Documentation

typedef dataset<Input,Output> DataSet
 

Definition at line 26 of file learnmodel.h.

typedef std::vector<REAL> DataWgt
 

Definition at line 27 of file learnmodel.h.

typedef std::vector<ECOC_VECTOR> ECOC_TABLE
 

Definition at line 21 of file multiclass_ecoc.h.

typedef std::vector<int> ECOC_VECTOR
 

Definition at line 20 of file multiclass_ecoc.h.

typedef std::vector<REAL> Input
 

Definition at line 23 of file learnmodel.h.

typedef std::vector<DataWgt> JointWgt
 

Definition at line 16 of file adaboost_ecoc.h.

typedef std::map<REAL,REAL>::iterator MI
 

Definition at line 41 of file stump.cpp.

typedef std::vector<REAL> Output
 

Definition at line 24 of file learnmodel.h.

typedef struct svm_node* p_svm_node
 

Definition at line 31 of file svm.cpp.

typedef const_shared_ptr<DataSet> pDataSet
 

Definition at line 28 of file learnmodel.h.

typedef const_shared_ptr<DataWgt> pDataWgt
 

Definition at line 29 of file learnmodel.h.

typedef const_shared_ptr<JointWgt> pJointWgt
 

Definition at line 17 of file adaboost_ecoc.h.

typedef var_shared_ptr<LearnModel> pLearnModel
 

Definition at line 17 of file aggregating.h.

typedef std::vector<std::vector<REAL> > WMAT
 

Definition at line 27 of file adaboost_ecoc.cpp.


Enumeration Type Documentation

enum ECOC_TYPE
 

Enumerator:
ONE_VS_ONE 
ONE_VS_ALL 

Definition at line 22 of file multiclass_ecoc.h.


Function Documentation

void lemga::dset_extract const pDataSet ptd,
RMAT X,
RVEC y
 

Definition at line 179 of file perceptron.cpp.

Referenced by Perceptron::train().

void lemga::dset_mult_wgt const pDataWgt ptw,
RVEC y
[inline]
 

Definition at line 189 of file perceptron.cpp.

p_svm_node lemga::fill_svm_node const Input x,
struct svm_node *  pool
 

Definition at line 92 of file svm.cpp.

Referenced by SVM::kernel(), SVM::operator()(), and SVM::signed_margin().

void lemga::iterative_optimize SEARCH  s  ) 
 

Main search routine.

Definition at line 74 of file optimize.h.

Referenced by MgnBoost::train(), FeedForwardNN::train(), CGBoost::train_gd(), and Boosting::train_gd().

bool lemga::ldivide std::vector< std::vector< REAL > > &  A,
const std::vector< REAL > &  b,
std::vector< REAL > &  x
 

Solve inv(A) * b, when A is symmetric and positive-definite. Actually we only need the upper triangular part of A.

bool lemga::ldivide RMAT A,
const RVEC b,
RVEC x
 

Definition at line 120 of file perceptron.cpp.

References Cholesky_decomp(), and Cholesky_linsol().

DataSet * load_data std::istream &  is,
UINT  n
 

An easier-to-use version, where the output dimension is fixed at 1, and the input dimension is auto-detected. This version requires that each row of stream is should be a sample.

Definition at line 46 of file learnmodel.cpp.

References dataset::append(), and dataset::size().

DataSet * load_data std::istream &  is,
UINT  n,
UINT  in,
UINT  out
 

Load a data set from a stream.

Each sample consists of first the input and then the output. Numbers are separated by spaces.

Parameters:
is the input stream
n gives the number of samples
in is the dimension of input
out is the dimension of output
Todo:
documentation: why separate function

Definition at line 37 of file learnmodel.cpp.

Referenced by DataFeeder::DataFeeder().

UINT lemga::randcdf REAL  r,
const RVEC cdf
[inline]
 

Definition at line 324 of file perceptron.cpp.

void lemga::update_wgt RVEC wgt,
const RVEC dir,
const RMAT X,
const RVEC y
 

Update the weight wgt along the direction dir. If necessary, the whole wgt will be negated.

Definition at line 131 of file perceptron.cpp.

References DOTPROD.


Variable Documentation

const kernel::RBF _svm_ker(0.5)
 


Generated on Mon Jan 9 23:44:24 2006 for LEMGA by  doxygen 1.4.6