Main Page | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

DefectTrainer Class Reference

Class dedicated to training mode. More...

Inheritance diagram for DefectTrainer:

Defectix DefectixError::ErrorMgr List of all members.

Public Member Functions

 DefectTrainer (const DefectixOptions::Options &options)
 Standard constructor.

const errorCodes exec ()
 Main function.

const errorCodes createNetworks ()
 create networks recursively


Private Member Functions

errorCodes createVectors (gsl_matrix *input, gsl_matrix *output, std::map< int, gsl_matrix * > &inputSrc, std::map< int, gsl_matrix * > &outputSrc, FitsManager &mgr)
 create vectors needed for training

void createKLBase (gsl_matrix *inputV)
 compute or load a KL-Base and compute PCA

const errorCodes createNetwork (gsl_matrix *inputV, gsl_matrix *outputV)
 create a network and train it


Private Attributes

t_network * _l0
 Neural network.

int _nbPC
 Number of principal components.

int _nbVectors
 Number of vectors of the training base.

unsigned _maxIter
 Maximum number of iterations.

double _energyTreshold
 Network energy treshold.

std::string _evecFile
 Name of the file containing the KL-Base.


Detailed Description

Class dedicated to training mode.

The class is the training part of the project.


Constructor & Destructor Documentation

DefectTrainer::DefectTrainer const DefectixOptions::Options options  ) 
 

Standard constructor.

The constructor calls Defectix constructor and then initialises private members with 'options' values.

Parameters:
options Class containing every parameters set by the user (or default)


Member Function Documentation

void DefectTrainer::createKLBase gsl_matrix *  inputV  )  [private]
 

compute or load a KL-Base and compute PCA

The functions computes PCA. If a file DefectTrainer::_evecFile exists, it is loaded as the KL-Base. If no file exists, the base is computed first.

Parameters:
inputV input vector to transform on the KL-Base

const errorCodes DefectTrainer::createNetwork gsl_matrix *  inputV,
gsl_matrix *  outputV
[private]
 

create a network and train it

The function creates a network accordingly to input and output vectors. The network is then trained using rprop algorithm.

Parameters:
inputV input vector (obtained with createVectors())
outputV output vector (obtained with createVectors())

const errorCodes DefectTrainer::createNetworks  ) 
 

create networks recursively

The functions creates networks and trains them recursively

errorCodes DefectTrainer::createVectors gsl_matrix *  input,
gsl_matrix *  output,
std::map< int, gsl_matrix * > &  inputSrc,
std::map< int, gsl_matrix * > &  outputSrc,
FitsManager mgr
[private]
 

create vectors needed for training

The functions reads images and masks and create input and output vectors for training.

Parameters:
input neural network input vector to fill
output neural network output vector to fill
inputSrc image source list
outputSrc mask source list
mgr image manager to handle lists

const errorCodes DefectTrainer::exec  )  [virtual]
 

Main function.

The function starts the training

Implements Defectix.


Member Data Documentation

double DefectTrainer::_energyTreshold [private]
 

Network energy treshold.

_energyTreshold is the energy limit the network must reach to stop converging.

std::string DefectTrainer::_evecFile [private]
 

Name of the file containing the KL-Base.

_evecFile is the name of the KL-Base stored as a gsl_matrix.

t_network * DefectTrainer::_l0 [private]
 

Neural network.

_l0 is the neural network used in DefectTrainer::createNetwork()

unsigned DefectTrainer::_maxIter [private]
 

Maximum number of iterations.

_maxIter is the maximum number of iterations the network is allowed to do without any energy decrease. This parameter avoid an infinite loop if _energyTreshold cannot be reached.

int DefectTrainer::_nbPC [private]
 

Number of principal components.

_nbPC is the number of principal components to use once the KL-Base is computed.

int DefectTrainer::_nbVectors [private]
 

Number of vectors of the training base.

_nbVectors is the number of vectors create in the input and output sets to train the network


The documentation for this class was generated from the following file:
Generated on Fri Jul 2 13:08:03 2004 for defectix by doxygen 1.3.5