--- myst: substitutions: bloc: python: 6-22 cpp: 6-22 --- # The Vectorial Quantification method 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 {{doe}}, 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. {numref}`sampler_vq_plot` 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" "} " + parent_dir + "/roottest/build/uranie/doc/sampler/bloc_codes_chapter/cpp/producePlotsSampler/NeuralGas_reduction.png\n" ":align: center\n" ":name: sampler_vq_plot\n" + figure_scale + "\n" "\n" "Example of a dataset reduction (the geyser one) using the NeuralGas algorithm, to go from 272 points (left) to 50 one (right)\n" "```" }} Here is an example of how to use the neuralgas algorithm to reduce a database. {{ "```{literalinclude} " + parent_dir + "/roottest/uranie/doc/sampler/bloc_codes_chapter/" + language + "/vectorial_quantification." + extension + "\n" + ":language: " + language + "\n" + ":lines: " + bloc[language] + "\n" + "```" }} **Construction of the plot** 1. Creation of `TCanvas` subdivided into two pieces to compare results. 2. Construction of the neuralgas object from the provided database 3. Get the sub-sample as a new dataserver, after looping 20 the algorithm 4. Access the latest histogram drawn on current pad, to change its title