Documentation / Manuel utilisateur en C++ :
This method is called when instead of having a list of input parameters (in terms of stochastic distribution) that one
would like to transform into a design-of-experiments, the user has a dataset, made out of a very large number of points. In this case,
it is possible, using the TNeuralGas
class, to create sub-sample of points that would be
representative of the complete provided-set, based on a NeuralGas algorithm. This might be useful in order to test the
output of long and complicated codes or computations without leaving aside a possible area of the input parameter
values.
Figure III.16 shows the effect of the reduction of the sample in the simple case of a
two-dimensional plane, when considering the "geyser.dat" file and its sub-sample of 50 points.
Figure III.16. Example of a dataset reduction (the geyser one) using the NeuralGas algorithm, to go from 272 points (left) to 50 one (right)
Here is an example of how to use the neuralgas algorithm to reduce a database.
TCanvas *c = new TCanvas("Can","Can",10,32,1300,600);
c->Divide(2,1);
TDataServer *tdsGeyser = new TDataServer("tdsgeyser", "Neural Gas for Geyser");
tdsGeyser->fileDataRead("geyser.dat");
TNeuralGas * tvq = new TNeuralGas(tdsGeyser,"", 50);
tvq->setDrawProgressBar(kFALSE);
TDataServer *tdsng = tvq->getSubSample("loop=20");
c->cd(1);
tdsGeyser->draw("x2:x1");
((TH2F*)gPad->GetPrimitive("__tdshisto__0"))->SetTitle("Geyser, 272 points");
c->cd(2);
tdsng->draw("x2:x1");
((TH2F*)gPad->GetPrimitive("__tdshisto__0"))->SetTitle("VQ, 50 points");
Construction of the plot
Creation of | |
Construction of the neuralgas object from the provided database | |
Get the sub-sample as a new dataserver, after looping 20 the algorithm | |
Access the latest histogram drawn on current pad, to change its title |