English Français

Documentation / Developer's manual

Available modules

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / Sampler: URANIE::Sampler::TVQ Class Reference
Uranie / Sampler v4.9.0
/* @license-end */
URANIE::Sampler::TVQ Class Referenceabstract

Abstract class for Vectorial Quantification (VQ) algorithms. More...

#include <TVQ.h>

Inheritance diagram for URANIE::Sampler::TVQ:
Collaboration diagram for URANIE::Sampler::TVQ:

Public Member Functions

Constructor and Destructor
 TVQ (URANIE::DataServer::TDataServer *tds, Option_t *option, Int_t ns)
 Constructor with a dataserver.
 
virtual ~TVQ ()
 Default destructor.
 
Setting and Getting global informations
Bool_t getSaveAll ()
 Returns the flag SaveAll.
 
void setDrawProgressBar (Bool_t bbool=kTRUE)
 Set the "draw progress bar" flag.
 
Bool_t getDrawProgressBar ()
 Get the clean flag.
 
Treats the TAttributes
void createListOfAttributes ()
 Creates the list of attributes to select patterns.
 
void shuffle ()
 shuffle the learning database (original TDataServer)
 
Manipulate the sample

The method to get the subsample TDataServer

URANIE::DataServer::TDataServer * getSubSample (Option_t *option="")
 Generate the Sample and return the TDataServer.
 
State machine

For the learning process, three states can be created

  • init : execute at the begining of the learning
  • learn (index) : the learning step for the pattern number index
  • terminate : the terminate step executing at the end of the learning The init and terminate step can be used for pre and post treatment purpose.
virtual void init ()
 The pre-processing step.
 
virtual void terminate ()
 The post-processing step.
 
virtual void learn (Int_t index)=0
 The learning step for a pattern.
 
Printing Log
virtual void printLog (Option_t *option="")
 Prints the log.
 
- Public Member Functions inherited from URANIE::Sampler::TSamplerStochastic
 TSamplerStochastic (URANIE::DataServer::TDataServer *tds, Option_t *option, Int_t nCalcul)
 Constructor with a dataserver.
 
virtual ~TSamplerStochastic ()
 Default destructor.
 
void setSeed (Int_t ind=0)
 Init the seed.
 
Int_t getSeed ()
 Returns the seed value.
 
- Public Member Functions inherited from URANIE::Sampler::TSampler
 TSampler (URANIE::DataServer::TDataServer *tds, Option_t *option, Int_t nCalcul)
 Constructor with a TDataServer, the options and the size of the sample.
 
virtual ~TSampler ()
 Default destructor.
 
Int_t GetID ()
 Returns the ID of the class.
 
void setMethodName (TString str)
 Sets the method name in a global variable.
 
TString getMethodName ()
 Gets the method name.
 
virtual URANIE::DataServer::TDataServer * getTDS ()
 Return the TDS filling by the sampling algorithm.
 
void parseOption (Option_t *option)
 Parse the option.
 
virtual void generateSample (Option_t *option="")=0
 Generates the Sample.
 
virtual void createTuple ()
 Creates the TDSNtupleD of data with only the TStochasticAttributes.
 
URANIE::DataServer::TDSNtupleD * getTuple ()
 Returns the TDSNtupleD of data.
 
virtual void fillOtherAttributes ()
 Fills the TDSNtupleD of data with other TFormulaAttributes.
 
void setLog ()
 
void unsetLog ()
 
void changeLog ()
 
Bool_t getLog ()
 

Public Attributes

TVector _vecindexorg
 The vector of index of the database.
 
URANIE::DataServer::TDataServer * _subtds
 The subsampler returened by the getSubSample method.
 
Bool_t _bsaveall
 The boolean to save all the data in the learning (default = kFALSE)
 
TString _sattributes
 the list of attributes
 
- Public Attributes inherited from URANIE::Sampler::TSampler
Int_t _nS
 The size of the sample.
 
Int_t _nX
 The size of attributes to sample.
 
URANIE::DataServer::TDSNtupleD * _ntsample
 the tntuple of data
 
TString _sMethod
 The title of the sampler method.
 
Bool_t _blog
 Log Printing.
 
Bool_t _bupdateFile
 Update the back up file when generating the attributeformula if there is some.
 
URANIE::DataServer::TDataServer * _tds
 Pointer to a TDS.
 
TList * _lstOfAttributesToSample
 The list of Stochastic Attributes to sample.
 

Protected Attributes

URANIE::DataServer::UMessageLogger * _fLogger
 
Bool_t _bdrawProgressBar
 Boolean to know if the progress bar has to be drawn.
 
- Protected Attributes inherited from URANIE::Sampler::TSamplerStochastic
Int_t _nSeed
 

Additional Inherited Members

State machine

For the stochastic methods, two2 states can be created init and terminate which are executed just before the generation of the sample for the first one, and after the generation for the second one. They can be used for pre and post treatment purpose.

Detailed Description

Abstract class for Vectorial Quantification (VQ) algorithms.

The generateSample method of these VQ classes can be considered as a machine with 3 states :

Implementation
The virtual methods to implement for a new VQ class are the learn(index) and generateSample methods.
Implemented algorithms :
  • TNeuralGas : The Neural Gas algorithm (Martinetz and Schulten, 1991)

Constructor & Destructor Documentation

◆ TVQ()

URANIE::Sampler::TVQ::TVQ ( URANIE::DataServer::TDataServer *  tds,
Option_t *  option,
Int_t  ns 
)

Constructor with a dataserver.

Parameters
tds(URANIE::DataServer::TDataServer *) the original data
option(Option_t) contains the options
  • "saveall" Save all the data generate by the algorithm ( _bsaveall = kTRUE). When is TRUE, all points during the learning process are store in the TDataServer, and when is FALSE, only points at the last iteration are store.
ns(Int_t) the size of the subsample

References _bsaveall.

◆ ~TVQ()

URANIE::Sampler::TVQ::~TVQ ( )
virtual

Default destructor.

References _subtds.

Member Function Documentation

◆ createListOfAttributes()

void URANIE::Sampler::TVQ::createListOfAttributes ( )
virtual

◆ getDrawProgressBar()

Bool_t URANIE::Sampler::TVQ::getDrawProgressBar ( )
inline

Get the clean flag.

Returns
(Bool_t) the clean flag (boolean)

References _bdrawProgressBar.

◆ getSaveAll()

Bool_t URANIE::Sampler::TVQ::getSaveAll ( )
inline

Returns the flag SaveAll.

  • When is TRUE, all points during the learning process are store in the TDataServer.
  • When is FALSE, only points at the last iteration are store in the TDataServer.

References _bsaveall.

◆ getSubSample()

URANIE::DataServer::TDataServer * URANIE::Sampler::TVQ::getSubSample ( Option_t *  option = "")

Generate the Sample and return the TDataServer.

Parameters
option(Option_t) contains the options
  • "loop=" Defines the number of loop to stop the algorithm. ("loop=10" for example)

References _subtds, and URANIE::Sampler::TSampler::generateSample().

◆ init()

◆ learn()

virtual void URANIE::Sampler::TVQ::learn ( Int_t  index)
pure virtual

The learning step for a pattern.

Implemented in URANIE::Sampler::TNeuralGas.

◆ printLog()

void URANIE::Sampler::TVQ::printLog ( Option_t *  option = "")
virtual

Prints the log.

Reimplemented from URANIE::Sampler::TSamplerStochastic.

Reimplemented in URANIE::Sampler::TNeuralGas.

◆ setDrawProgressBar()

void URANIE::Sampler::TVQ::setDrawProgressBar ( Bool_t  bbool = kTRUE)
inline

Set the "draw progress bar" flag.

The progress bar will be drawn if and only if the "draw progress bar" flag is true.

References _bdrawProgressBar.

◆ shuffle()

void URANIE::Sampler::TVQ::shuffle ( )

shuffle the learning database (original TDataServer)

References URANIE::Sampler::TSampler::_blog, and _vecindexorg.

Referenced by URANIE::Sampler::TNeuralGas::generateSample(), and URANIE::Sampler::TNeuralGas::init().

◆ terminate()

void URANIE::Sampler::TVQ::terminate ( )
virtual

The post-processing step.

Reimplemented from URANIE::Sampler::TSamplerStochastic.

References URANIE::Sampler::TSampler::_blog.

Referenced by URANIE::Sampler::TNeuralGas::generateSample().

Member Data Documentation

◆ _bdrawProgressBar

Bool_t URANIE::Sampler::TVQ::_bdrawProgressBar
protected

Boolean to know if the progress bar has to be drawn.

Referenced by URANIE::Sampler::TNeuralGas::generateSample(), getDrawProgressBar(), and setDrawProgressBar().

◆ _bsaveall

Bool_t URANIE::Sampler::TVQ::_bsaveall

◆ _fLogger

URANIE::DataServer::UMessageLogger* URANIE::Sampler::TVQ::_fLogger
protected

◆ _sattributes

TString URANIE::Sampler::TVQ::_sattributes

the list of attributes

Referenced by URANIE::Sampler::TNeuralGas::generateSample(), and init().

◆ _subtds

URANIE::DataServer::TDataServer* URANIE::Sampler::TVQ::_subtds

The subsampler returened by the getSubSample method.

Referenced by getSubSample(), URANIE::Sampler::TNeuralGas::init(), init(), URANIE::Sampler::TNeuralGas::learn(), and ~TVQ().

◆ _vecindexorg

TVector URANIE::Sampler::TVQ::_vecindexorg

The vector of index of the database.

Referenced by URANIE::Sampler::TNeuralGas::generateSample(), URANIE::Sampler::TNeuralGas::init(), init(), and shuffle().