--- myst: substitutions: bloc: python: 1-5,16-24,27-64 cpp: 5-6,13-18,21-56 --- ```{include} /../core/uncertModeler/edf_tests.md ``` The implemented tests are the **Kolmogorov-Smirnov ($D$)** test, the **Cramer-VonMises ($W^2$)** test and the **Anderson-Darling ($A^2$)** test. Their aim is to compare a given attribute to a bunch of implemented laws among the following list: the normal, lognormal and uniform law. The details of the computation is given in {{metho}}. The following piece of code gives an example of what can be achieved using these three classes and the usage of their options defined in the summary block below. {numref}`uncertModeler_uncertModelerttesterExample` shows the results of such a script. {{ "```{literalinclude} " + parent_dir + "/roottest/uranie/doc/uncertModeler/use_cases/" + language + "/uncertModelerttesterExample." + extension + "\n" + ":language: " + language + "\n" + ":lines: " + bloc[language] + "\n" + "```" }} {{ "```{" "figure" "} " + parent_dir + "/roottest/build/uranie/doc/uncertModeler/use_cases/" + language + "/tester_example/uncertModelerttesterExample.png\n" ":align: center\n" ":name: uncertModeler_uncertModelerttesterExample\n" + figure_scale + "\n" "\n" "Results of the macro defined previously to produce variety of test of already implemented distributions\n" "```" }} :::{admonition} Summary: Tests based on the EDF (`TTestKolmogorovSmirnov`, `TTestCramerVonMises` and `TTestAndersonDarling` classes) - `TTestKolmogorovSmirnov`(**{{tds}}** tds, __const char \*__ sAtt, __Option_t \*__ option="") Define the **Kolmogorov-Smirnov (D)** test for the attribute *sAtt*. No option is used. - `TTestCramerVonMises`(**{{tds}}** tds, __const char \*__ sAtt, __Option_t \*__ option="") Define the **Cramer-VonMises (W2)** test for the attribute *sAtt*. No option is used. - `TTestAndersonDarling`(**{{tds}}** tds, __const char \*__ sAtt, __Option_t \*__ option="") Define the **Anderson-Darling (A2)** test for the attribute *sAtt*. No option is used. - `computeScore`(__Option_t\*__ option="") Compute the score for the current test ( D, W2 and A2) with laws defined in the option parameter. The laws are separated by the ":" character. If the parameters of the law are defined by the user, they are defined in brackets *"()"* as *normal(30576,1450)*. If the parameters must be estimated by the algorithm, do not use the brackets as *normal*. Actually, the laws implemented are the *normal* and *lognormal* laws. :::