Documentation / Manuel développeur
Modules disponibles
Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,  
Uranie / Sampler v4.9.0
|
Implement the Neural Gas algorithm (Martinetz and Schulten, 1991) More...
#include <TNeuralGas.h>
Public Member Functions | |
Constructor and Destructor | |
TNeuralGas (URANIE::DataServer::TDataServer *tds, Option_t *option, Int_t ns) | |
Constructor with a dataserver. | |
virtual | ~TNeuralGas () |
Default destructor. | |
Setting and Getting attributs | |
void | setLambda (Double_t dinitlambda, Double_t dfinallambda) |
Set the lambda parameters. | |
void | setAlpha (Double_t dinitalpha, Double_t dfinalalpha) |
Set the alpha parameters. | |
void | setTMax (Int_t dtmax) |
Set the parameter. | |
Int_t | getTMax () |
Get the parameter. | |
State machine | |
For the stochastic methods, two 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. | |
void | init () |
The preprocessing step. | |
void | learn (Int_t index) |
The learning step for the index pattern. | |
Generate the sample | |
the generate sample procedure | |
void | generateSample (Option_t *option="") |
Generates the sample. | |
Printing Log | |
virtual void | printLog (Option_t *option="") |
Prints the log. | |
Public Member Functions inherited from URANIE::Sampler::TVQ | |
TVQ (URANIE::DataServer::TDataServer *tds, Option_t *option, Int_t ns) | |
Constructor with a dataserver. | |
virtual | ~TVQ () |
Default destructor. | |
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. | |
void | createListOfAttributes () |
Creates the list of attributes to select patterns. | |
void | shuffle () |
shuffle the learning database (original TDataServer) | |
URANIE::DataServer::TDataServer * | getSubSample (Option_t *option="") |
Generate the Sample and return the TDataServer. | |
virtual void | terminate () |
The post-processing step. | |
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 | 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 | |
TMatrixD | _datamatrix |
The matrix of data. | |
TMatrixD | _dvw |
The matrix of difference. | |
TString | _svardraw |
Int_t | _ntemperature |
Double_t | _dtmax |
The parameter. | |
Double_t | _dinitlambda |
The initial value of . | |
Double_t | _dlambda |
The current value of . | |
Double_t | _dfinalambda |
The final value of . | |
Double_t | _dinitalpha |
The initial value of . | |
Double_t | _dalpha |
The current value of . | |
Double_t | _dfinalalpha |
The final value of . | |
Public Attributes inherited from URANIE::Sampler::TVQ | |
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. | |
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. | |
Protected Attributes inherited from URANIE::Sampler::TVQ | |
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 |
Detailed Description
Implement the Neural Gas algorithm (Martinetz and Schulten, 1991)
The Neural Gas Algorithm (Martinetz and Schulten, 1991) sorts for each input signal the units of the network according to the distance of their reference vectors to . Based on this rank order a certain number of units is adapted. Both the number of adapted units and the adaptation strength are decreased according to a fixed schedule.
The reference vectors are adjusted according to
with the following time-dependencies:
- Default values
In the subsample dataserver, it exists an internal attribute "__neural__gas_iter__" which contains the number of loop need by the learning process.
- Example
- TDataServer *tds = new TDataServer("tdsgeyser", "Neural Gas for Geyser dataset");tds->fileDataRead("geyser.dat");TDataServer *tdsng = tvq->getSubSample("loop=100");tds->draw("x2:x1");tdsng->draw("x2:x1","","same");Implement the Neural Gas algorithm (Martinetz and Schulten, 1991)Definition TNeuralGas.h:92URANIE::DataServer::TDataServer * getSubSample(Option_t *option="")Generate the Sample and return the TDataServer.Definition TVQ.cxx:205
Constructor & Destructor Documentation
◆ TNeuralGas()
URANIE::Sampler::TNeuralGas::TNeuralGas | ( | 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 [default ""] - "saveall" Save all the data generate by the algorithm ( _bsaveall = kTRUE).
ns (Int_t) the size of the subsample
References _dinitlambda, URANIE::Sampler::TSampler::_nS, and URANIE::Sampler::TSampler::_tds.
◆ ~TNeuralGas()
|
virtual |
Default destructor.
References URANIE::Sampler::TVQ::_fLogger.
Member Function Documentation
◆ generateSample()
|
virtual |
Generates the sample.
Implements URANIE::Sampler::TSampler.
References URANIE::Sampler::TVQ::_bdrawProgressBar, URANIE::Sampler::TSampler::_blog, URANIE::Sampler::TVQ::_bsaveall, _dalpha, _dfinalalpha, _dfinalambda, _dinitalpha, _dinitlambda, _dlambda, _dtmax, URANIE::Sampler::TVQ::_fLogger, URANIE::Sampler::TSampler::_lstOfAttributesToSample, URANIE::Sampler::TSampler::_nS, URANIE::Sampler::TSamplerStochastic::_nSeed, _ntemperature, URANIE::Sampler::TVQ::_sattributes, URANIE::Sampler::TSampler::_tds, URANIE::Sampler::TVQ::_vecindexorg, init(), learn(), URANIE::Sampler::TVQ::shuffle(), and URANIE::Sampler::TVQ::terminate().
◆ getTMax()
|
inline |
Get the parameter.
References _dtmax.
◆ init()
|
virtual |
The preprocessing step.
Reimplemented from URANIE::Sampler::TVQ.
References URANIE::Sampler::TSampler::_blog, URANIE::Sampler::TVQ::_bsaveall, _datamatrix, _dvw, URANIE::Sampler::TSampler::_lstOfAttributesToSample, URANIE::Sampler::TSampler::_nS, URANIE::Sampler::TSampler::_nX, URANIE::Sampler::TVQ::_subtds, URANIE::Sampler::TSampler::_tds, URANIE::Sampler::TVQ::_vecindexorg, URANIE::Sampler::TVQ::init(), and URANIE::Sampler::TVQ::shuffle().
Referenced by generateSample().
◆ learn()
|
virtual |
The learning step for the index pattern.
Implements URANIE::Sampler::TVQ.
References URANIE::Sampler::TSampler::_blog, URANIE::Sampler::TVQ::_bsaveall, _dalpha, _datamatrix, _dlambda, _dtmax, _dvw, URANIE::Sampler::TSampler::_lstOfAttributesToSample, URANIE::Sampler::TSampler::_nS, _ntemperature, URANIE::Sampler::TSampler::_nX, URANIE::Sampler::TVQ::_subtds, _svardraw, and URANIE::Sampler::TSampler::_tds.
Referenced by generateSample().
◆ printLog()
|
virtual |
Prints the log.
Reimplemented from URANIE::Sampler::TVQ.
References URANIE::Sampler::TVQ::_bsaveall, _dfinalalpha, _dfinalambda, _dinitalpha, _dinitlambda, _dtmax, and _ntemperature.
◆ setAlpha()
|
inline |
Set the alpha parameters.
Set the initial and final alpha parameters where the time-dependency is :
References _dfinalalpha, and _dinitalpha.
◆ setLambda()
|
inline |
Set the lambda parameters.
Set the initial and final lambda parameters where the time-dependency is :
References _dfinalambda, and _dinitlambda.
◆ setTMax()
|
inline |
Set the parameter.
References _dtmax.
Member Data Documentation
◆ _dalpha
Double_t URANIE::Sampler::TNeuralGas::_dalpha |
The current value of .
Referenced by generateSample(), and learn().
◆ _datamatrix
TMatrixD URANIE::Sampler::TNeuralGas::_datamatrix |
◆ _dfinalalpha
Double_t URANIE::Sampler::TNeuralGas::_dfinalalpha |
The final value of .
Referenced by generateSample(), printLog(), and setAlpha().
◆ _dfinalambda
Double_t URANIE::Sampler::TNeuralGas::_dfinalambda |
The final value of .
Referenced by generateSample(), printLog(), and setLambda().
◆ _dinitalpha
Double_t URANIE::Sampler::TNeuralGas::_dinitalpha |
The initial value of .
Referenced by generateSample(), printLog(), and setAlpha().
◆ _dinitlambda
Double_t URANIE::Sampler::TNeuralGas::_dinitlambda |
The initial value of .
Referenced by generateSample(), printLog(), setLambda(), and TNeuralGas().
◆ _dlambda
Double_t URANIE::Sampler::TNeuralGas::_dlambda |
The current value of .
Referenced by generateSample(), and learn().
◆ _dtmax
Double_t URANIE::Sampler::TNeuralGas::_dtmax |
The parameter.
Referenced by generateSample(), getTMax(), learn(), printLog(), and setTMax().
◆ _dvw
TMatrixD URANIE::Sampler::TNeuralGas::_dvw |
◆ _ntemperature
Int_t URANIE::Sampler::TNeuralGas::_ntemperature |
Referenced by generateSample(), learn(), and printLog().
◆ _svardraw
TString URANIE::Sampler::TNeuralGas::_svardraw |
Referenced by learn().