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  AdaBoost_ERP
 AdaBoost.ERP (AdaBoost.ECC with Re-Partitioning). 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  CrossVal
 A combination of cross-validation and model selection. More...
class  vFoldCrossVal
 v-fold cross validation. More...
class  HoldoutCrossVal
 Randomized holdout cross-validation. More...
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  Ordinal_BLE
 Ordinal regression via binary learning on extended examples. More...
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
 Cost functions and their derivatives.
namespace  details
namespace  kernel
 Kernels (inner product in some space).
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 vFoldCrossVal kFoldCrossVal
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 var_shared_ptr< LearnModelpLearnModel
typedef const_shared_ptr<
LearnModel
pcLearnModel
typedef std::vector< int > ECOC_VECTOR
typedef std::vector< ECOC_VECTORECOC_TABLE
typedef std::vector< std::vector<
REAL > > 
EXT_TABLE
typedef std::map< REAL, REAL
>::iterator 
MI
typedef svm_node * p_svm_node

Enumerations

enum  ECOC_TYPE { NO_TYPE, ONE_VS_ONE, ONE_VS_ALL }
enum  BLE_TYPE { MULTI_THRESHOLD, BLE_DEFAULT = MULTI_THRESHOLD }

Functions

DataSetload_data (std::istream &, UINT, UINT, UINT)
 Load a data set from a stream.
DataSetload_data (std::istream &is, UINT n)
bool lp_add_hypothesis (LPX *lp, int *ndx, double *val, const LearnModel &lm, const pDataWgt &pdw=0, REAL maxe=0)
REAL lp_solve (LPX *lp, pDataWgt &pdw)
template<class SEARCH>
void iterative_optimize (SEARCH s)
 Main search routine.
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)
p_svm_node fill_svm_node (const Input &x, struct svm_node *pool)


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<std::vector<REAL> > EXT_TABLE
 

Definition at line 15 of file ordinal_ble.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 vFoldCrossVal kFoldCrossVal
 

Definition at line 115 of file crossval.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<LearnModel> pcLearnModel
 

Definition at line 196 of file learnmodel.h.

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 195 of file learnmodel.h.

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

Definition at line 42 of file adaboost_ecoc.cpp.


Enumeration Type Documentation

enum BLE_TYPE
 

Enumerator:
MULTI_THRESHOLD 
BLE_DEFAULT 

Definition at line 16 of file ordinal_ble.h.

enum ECOC_TYPE
 

Enumerator:
NO_TYPE 
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 127 of file perceptron.cpp.

Referenced by Perceptron::train().

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

Definition at line 137 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 FeedForwardNN::train(), MgnBoost::train_gd(), CGBoost::train_gd(), and Boosting::train_gd().

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().

bool lemga::lp_add_hypothesis LPX *  lp,
int *  ndx,
double *  val,
const LearnModel &  lm,
const pDataWgt pdw = 0,
REAL  maxe = 0
 

Definition at line 22 of file lpboost.cpp.

References LearnModel::c_error(), LearnModel::get_output(), LearnModel::train_data(), and U.

REAL lemga::lp_solve LPX *  lp,
pDataWgt pdw
 

Definition at line 49 of file lpboost.cpp.

References EPSILON, and U.

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

Definition at line 271 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 79 of file perceptron.cpp.

References DOTPROD.


Generated on Wed Nov 8 08:16:28 2006 for LEMGA by  doxygen 1.4.6