--- myst: substitutions: macro: python: 1-9,24-57,60-72,74-78,80-92,95-210 cpp: 6-8,15-45,48-60,62-65,67-75,78-173 bloc1: python: "65" cpp: "53" --- # Macro "**sensitivityRegressionLeveLE.{{extension}}**" ```{warning} The `levele` command will be installed on your machine only if a Fortran compiler is found ``` ## Objective The objective of this macro is to perform a SRC and SRRC measurement on the temporal use-case `levele`. This use-case is an example of code that takes a dozen of entries in order to compute the evolution of dose as a function of time. The result of every computation consists in 3 vectors: the time (always the same value disregarding all entries), the dose called "y" and a third useless information. ## Macro {{uranie}} {{ "```{" "literalinclude" "} " + parent_dir + "/roottest/uranie/doc/sensitivity/use_cases/" + language + "/sensitivityRegressionLeveLE." + extension + "\n" + ":language: " + language + "\n" + ":lines: " + macro[language] + "\n" + "```" }} The `levele` external code is located in the bin directory of the {{uranie}} installation. When looking at the code and comparing it to an usual Regression estimation, the organisation is completely transparent. The only noticeable (and compulsory) thing to do is to change the default type of the attribute read at the end of the job. This is done in this line: {{ "```{" "literalinclude" "} " + parent_dir + "/roottest/uranie/doc/sensitivity/use_cases/" + language + "/sensitivityRegressionLeveLE." + extension + "\n" + ":language: " + language + "\n" + ":lines: " + bloc1[language] + "\n" + "```" }} where the output attribute is provided, changing its nature to a vector, thanks to the second argument of the `TAttribute` constructor from the default (`kReal`) to the desired nature (`kVector`). Once this is done, this information is broadcast internally to the code that knows how to deal with this type of attribute. The rest of the code is the graphical part, leading to the figure below (it is provided to illustrate how to represent results). ## Graph The results of the previous macro is shown in {numref}`use_cases_sensitivityRegressionLeveLE`, where the left panel represents the value of the $R^2$ coefficients both the SRC and SRRC coefficients estimation. The middle and right panel display the cumulative sum of the quadratic value of the coefficient respectively for the SRC and SRRC case. {{ "```{" "figure" "} " + parent_dir + "/roottest/build/uranie/doc/sensitivity/use_cases/" + language + "/regression_levelE/sensitivityRegressionLeveLE.png\n" + ":align: center\n" + ":name: use_cases_sensitivityRegressionLeveLE\n" + figure_scale + "\n" + "\n" + "Graph of the macro **\"sensitivityRegressionLeveLE." + extension + "\"**" + "\n" + "```" }}