Umami merge requestshttps://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests2022-04-05T18:36:33+02:00https://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/501Extend flexibility in input var plotting functions2022-04-05T18:36:33+02:00Joschka BirkExtend flexibility in input var plotting functions## Summary
This MR introduces the following changes
* using `**kwargs` in the plotting functions, allowing to specify any parameter that is understood in the plotting API (in this case the `histogram_plot` class) in the config file for...## Summary
This MR introduces the following changes
* using `**kwargs` in the plotting functions, allowing to specify any parameter that is understood in the plotting API (in this case the `histogram_plot` class) in the config file for plotting
* removed the `check_kwargs_var_plots` function
* moved the "kwargs translation" (for backwards compatibility) to the high-level functions in `plot_input_vars.py` (--> kwargs are translated to new naming right away, such that the new naming is used consistently afterwards)
* making `histogram_plot` functions less verbose (`logger.info` -> `logger.debug`), to reduce stdout in large plotting scripts
* adding a script that converts the "Parameters" section of certain docstrings to markdown tables. The resulting files can then be used in the docs (using our placeholder syntax we introduced in !476)
## Example
With this change, you can now e.g. remove the ATLAS branding from the input var plots by simply adding `atlas_brand: ""` to the `plot_settings` in the config:
<img src="/uploads/668c189f5dbb218c5ed3d2d028d6f55c/nTracks_per_Jet_All.png" height=500>
-->
<img src=/uploads/24e13d84e1c13e6e42998a4d1ba206b2/image.png height=200>
-->
<img src=/uploads/f1bf9920b2a34750feca933089d62dcc/nTracks_per_Jet_All.png height=500>
Relates to the following issues
* #147
## Conformity
- [x] [Changelog entry](https://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/blob/master/changelog.md)
- [x] [Documentation](https://umami-docs.web.cern.ch)
- [x] [Development guidelines](https://umami-docs.web.cern.ch/setup/development/)
- [x] [Style guides](https://umami-docs.web.cern.ch/setup/development/good-practices/)Joschka BirkJoschka Birkhttps://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/396adding plotting module2022-02-11T13:37:58+01:00Manuel Guthadding plotting modulethis MR introduces a new module `umami.plotting` (open for other name suggestions) which moves the plotting into one module using class syntax making everything more modular and then easier to call via python API
in this first step the ...this MR introduces a new module `umami.plotting` (open for other name suggestions) which moves the plotting into one module using class syntax making everything more modular and then easier to call via python API
in this first step the roc curves are being introduced
- `figure_base` class having all the information about the figure and its over all style
- `roc` class containing info about one roc curve and allows to calculate the ratio to another roc curve etc.
do people haven thoughts about this new way of doing things? @alfroch @pgadow @svanstro @birk
first step towards #100
An example how the roc plotting is done now
```python
from umami.plotting import roc, roc_plot
plot_roc = roc_plot(
n_ratio_panels=2, ylabel="background Rejection", xlabel="b-jets efficiency"
)
plot_roc.add_roc(
roc(
sig_eff,
rnnip_ujets_rej,
n_test=100000,
rej_class="ujets",
signal_class="bjets",
label="RNNIP",
colour="#AA3377",
),
reference=True,
)
plot_roc.add_roc(
roc(
sig_eff,
dips_ujets_rej,
n_test=100000,
rej_class="ujets",
signal_class="bjets",
label="DIPS",
colour="#228833",
),
)
plot_roc.add_roc(
roc(
sig_eff,
rnnip_cjets_rej,
n_test=100000,
rej_class="cjets",
signal_class="bjets",
label="RNNIP",
colour="#AA3377",
),
reference=True,
)
plot_roc.add_roc(
roc(
sig_eff,
dips_cjets_rej,
n_test=100000,
rej_class="cjets",
signal_class="bjets",
label="DIPS",
colour="#228833",
),
)
plot_roc.set_ratio_class(1, "ujets")
plot_roc.set_ratio_class(2, "cjets")
plot_roc.draw(
rlabel=[
"light-flavour jets ratio",
"c-jets ratio",
],
leg_class_labels=[
"light-flavour jets rejection",
"c-jets rejection",
],
)
plot_roc.savefig("roc.pdf")
```https://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/722Adding plot_type to Preprocessing configs2023-04-17T13:17:25+02:00Alexander FrochAdding plot_type to Preprocessing configs## Summary
This MR introduces the following changes
* Adding the option `plot_type` to the preprocessing config which sets the plot type of all plots which are created during preprocessing. This is optional and backward compatible. The...## Summary
This MR introduces the following changes
* Adding the option `plot_type` to the preprocessing config which sets the plot type of all plots which are created during preprocessing. This is optional and backward compatible. The default (if `plot_type` is not given in the config) is pdf.
## Conformity
- [x] [Changelog entry](https://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/blob/master/changelog.md)
- [X] [Documentation](https://umami-docs.web.cern.ch)
- [X] [Development guidelines](https://umami-docs.web.cern.ch/setup/development/)
- [X] [Style guides](https://umami-docs.web.cern.ch/setup/development/good-practices/)Alexander FrochAlexander Frochhttps://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/714Adding duplicated jets plot to after resampling plots2023-03-28T15:33:04+02:00Alexander FrochAdding duplicated jets plot to after resampling plots## Summary
This MR introduces the following changes
* Adding a histogram how often a jet is duplicated (Duplicated_jet_multiplicity.pdf)
* Fixing preprocessing plots for hybrid resampling (plots are overwritten when the hybrid resampli...## Summary
This MR introduces the following changes
* Adding a histogram how often a jet is duplicated (Duplicated_jet_multiplicity.pdf)
* Fixing preprocessing plots for hybrid resampling (plots are overwritten when the hybrid resampling starts, this is fixed now)
The new plots look like this:
<img src="/uploads/a7804c5f0ceda3e80f6feea4d02d4240/Duplicated_jet_multiplicity.png" width="600" height="450">
## Conformity
- [x] [Changelog entry](https://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/blob/master/changelog.md)
- [X] [Documentation](https://umami-docs.web.cern.ch)
- [X] [Development guidelines](https://umami-docs.web.cern.ch/setup/development/)
- [X] [Style guides](https://umami-docs.web.cern.ch/setup/development/good-practices/)Alexander FrochAlexander Frochhttps://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/540Moving to puma package2022-05-18T14:30:13+02:00Manuel GuthMoving to puma package## Summary
This MR introduces the following changes
* switching to [puma package](https://github.com/umami-hep/puma) as plotting API
Relates to the following issues
* relates to https://gitlab.cern.ch/atlas-flavor-tagging-tools/algo...## Summary
This MR introduces the following changes
* switching to [puma package](https://github.com/umami-hep/puma) as plotting API
Relates to the following issues
* relates to https://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/issues/168
*
## Conformity
- [x] [Changelog entry](https://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/blob/master/changelog.md)
- [x] [Documentation](https://umami-docs.web.cern.ch)
- [x] [Development guidelines](https://umami-docs.web.cern.ch/setup/development/)
- [x] [Style guides](https://umami-docs.web.cern.ch/setup/development/good-practices/)https://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/532Adding Plotting API to PlottingFunctions in the eval tools2022-05-06T11:01:21+02:00Alexander FrochAdding Plotting API to PlottingFunctions in the eval tools## Summary
This MR introduces the following changes
* Adding `draw_wps` to `histogram`. Here you need to give the x-axis value where the vertical lines are plotted (Needed for the discriminant scores plots).
* Removing `plotEfficiencyV...## Summary
This MR introduces the following changes
* Adding `draw_wps` to `histogram`. Here you need to give the x-axis value where the vertical lines are plotted (Needed for the discriminant scores plots).
* Removing `plotEfficiencyVariable`, `plotEfficiencyVariableComparison`, `FlatEfficiencyPerBin` and `plotFractionScan`.
* Merging `plotROCRatio` and `plotROCRatioComparison`.
* Merging `plot_score` and `plot_score_comparison`.
* Merging `plot_prob` and `plot_prob_comparison`.
* Adapting `plotting_umami.py` to merged functions.
* Adapting `plotting_umami.py` examples for DL1r, DIPS and Umami to merged functions.
* Adapting unit tests to new merged functions.
Relates to the following issues
* #175 will be added in another MR
* #176 will be added in another MR
## Conformity
- [X] [Changelog entry](https://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/blob/master/changelog.md)
- [X] [Documentation](https://umami-docs.web.cern.ch)
- [X] [Development guidelines](https://umami-docs.web.cern.ch/setup/development/)
- [X] [Style guides](https://umami-docs.web.cern.ch/setup/development/good-practices/)Alexander FrochAlexander Frochhttps://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/529Update atlas label2022-05-05T17:51:13+02:00Tomke SchroerUpdate atlas labelchange default ATLAS Label from "ATLAS Internal Simulation" to "ATLAS Simulation Internalchange default ATLAS Label from "ATLAS Internal Simulation" to "ATLAS Simulation InternalTomke SchroerTomke Schroerhttps://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/525Small fix in epoch performance plot2022-04-22T15:27:30+02:00Manuel GuthSmall fix in epoch performance plot## Summary
This MR introduces the following changes
* fixes an issue with the `plotting_epoch_performance.py` script, which was always using the default working point defined in the arg parser instead of the one in the config file## Summary
This MR introduces the following changes
* fixes an issue with the `plotting_epoch_performance.py` script, which was always using the default working point defined in the arg parser instead of the one in the config filehttps://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/524Adapting naming to PEP82022-04-20T13:48:19+02:00Manuel GuthAdapting naming to PEP8## Summary
This MR introduces the following changes
* fixes invalid-name errors from pylint
Relates to the following issues
* https://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/issues/167
## Conformity
- [x] [Chan...## Summary
This MR introduces the following changes
* fixes invalid-name errors from pylint
Relates to the following issues
* https://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/issues/167
## Conformity
- [x] [Changelog entry](https://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/blob/master/changelog.md)https://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/522renaming variables to match snake_case style2022-04-19T17:27:42+02:00Manuel Guthrenaming variables to match snake_case style## Summary
This MR introduces the following changes
* Renaming a bunch of functions and variables to match snake_case style
Relates to the following issues
* first step towards https://gitlab.cern.ch/atlas-flavor-tagging-tools/algori...## Summary
This MR introduces the following changes
* Renaming a bunch of functions and variables to match snake_case style
Relates to the following issues
* first step towards https://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/issues/167
## Conformity
- [x] [Changelog entry](https://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/blob/master/changelog.md)
- [x] [Documentation](https://umami-docs.web.cern.ch)
- [x] [Development guidelines](https://umami-docs.web.cern.ch/setup/development/)
- [x] [Style guides](https://umami-docs.web.cern.ch/setup/development/good-practices/)https://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/518plotting API: discrete values and pie charts2022-05-11T16:05:49+02:00Tomke Schroerplotting API: discrete values and pie chartsplotting API: Implement the option to plot only discrete values and add the option to plot Pie chartsplotting API: Implement the option to plot only discrete values and add the option to plot Pie chartsTomke SchroerTomke Schroerhttps://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/494(plotting API) add option to remove "ATLAS" from plots2022-03-28T11:24:39+02:00Joschka Birk(plotting API) add option to remove "ATLAS" from plots## Summary
This MR introduces the following changes
* adds the option to *not* use the ***ATLAS*** branding in the plots (needed for bachelor/master/PhD thesis)
* update version of `atlasify` (includes small fix for the case without **...## Summary
This MR introduces the following changes
* adds the option to *not* use the ***ATLAS*** branding in the plots (needed for bachelor/master/PhD thesis)
* update version of `atlasify` (includes small fix for the case without ***ATLAS***)
## Conformity
- [x] [Changelog entry](https://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/blob/master/changelog.md)
- ~~[ ] [Documentation](https://umami-docs.web.cern.ch)~~
- [x] [Development guidelines](https://umami-docs.web.cern.ch/setup/development/)
- [x] [Style guides](https://umami-docs.web.cern.ch/setup/development/good-practices/)Joschka BirkJoschka Birkhttps://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/482slim image update2022-03-16T08:55:55+01:00Manuel Guthslim image update## Summary
This MR introduces the following changes
* updates the umami slim image
Relates to the following issues
* closes #151
## Conformity
- [x] [Changelog entry](https://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/uma...## Summary
This MR introduces the following changes
* updates the umami slim image
Relates to the following issues
* closes #151
## Conformity
- [x] [Changelog entry](https://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/blob/master/changelog.md)
- [x] [Documentation](https://umami-docs.web.cern.ch)
- [x] [Development guidelines](https://umami-docs.web.cern.ch/setup/development/)
- [x] [Style guides](https://umami-docs.web.cern.ch/setup/development/good-practices/)https://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/480Add example plots to docs2022-03-16T15:18:47+01:00Joschka BirkAdd example plots to docs## Summary
This MR introduces the following changes
* adds a job to the CI pipeline which runs the example scripts in `examples/plotting` and hands the resulting plots as artifacts to the job which creates the docs
* updates in the doc...## Summary
This MR introduces the following changes
* adds a job to the CI pipeline which runs the example scripts in `examples/plotting` and hands the resulting plots as artifacts to the job which creates the docs
* updates in the docs, adding the above mentioned plots
* adds docs section for pt_vs_eff plot
* adds optional `add_pt` argument to dummy data
* fixing small bug in `replace_placeholders_in_md.py` which resulted in one line missing at the end
Relates to the following issues
* first step towards #159
The result is that we can add the output plot of an example script directly to the docs, which then also corresponds to the most recent version of the code.
<img src="/uploads/4ad17c915dd654bd2c15dbb7bd840225/image.png" height="800">
## Conformity
- [x] [Changelog entry](https://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/blob/master/changelog.md)
- ~~[x] [Documentation](https://umami-docs.web.cern.ch)~~
- [x] [Development guidelines](https://umami-docs.web.cern.ch/setup/development/)
- [x] [Style guides](https://umami-docs.web.cern.ch/setup/development/good-practices/)Joschka BirkJoschka Birkhttps://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/360Update docstrings in Plotting.py2022-01-21T10:48:11+01:00Joschka BirkUpdate docstrings in Plotting.pyUpdate the docstrings in the `Plotting.py` file to numpy style.Update the docstrings in the `Plotting.py` file to numpy style.Joschka BirkJoschka Birkhttps://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/330Fixing typo check in input variable plotting2022-01-11T11:51:59+01:00Alexander FrochFixing typo check in input variable plottingThis MR fixes #108. Correct checks are added and unit tests to check the behavior are implemented.
Closes #108This MR fixes #108. Correct checks are added and unit tests to check the behavior are implemented.
Closes #108Alexander FrochAlexander Frochhttps://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/290running black on umami2021-12-06T14:12:51+01:00Frederic Rennerrunning black on umamihttps://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/274Add track origin selection for input variable plotting2021-11-29T10:50:30+01:00Sebastien RettieAdd track origin selection for input variable plottingThis MR provides the functionality to require a specific track origin when plotting input variables. The default behaviour of `plot_input_variables.py` does not change, except for appending a suffix `_All` to the plot name (so the refere...This MR provides the functionality to require a specific track origin when plotting input variables. The default behaviour of `plot_input_variables.py` does not change, except for appending a suffix `_All` to the plot name (so the reference image names have also been updated). If desired, the user can now specify a list of `track_origins` in the configuration file. This will produce a set of plots, one for each track origin specified. Note that the `truthOriginLabel` variable must be present in the `.h5` files used for plotting for this option to work.
The unit tests are currently failing because the x-axis labels are different to the reference plots (they now include the track origin in the x-axis title).Sebastien RettieSebastien Rettiehttps://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/262Merge train executables and make the LR Reducer configurable2021-11-24T11:42:07+01:00Alexander FrochMerge train executables and make the LR Reducer configurableThis MR adds the following:
- Removed the executable part of the train scripts and created `train.py` which is now the executable.
- Added a flag in the `train_config` which has the tagger name in it. With this, the scripts can work wit...This MR adds the following:
- Removed the executable part of the train scripts and created `train.py` which is now the executable.
- Added a flag in the `train_config` which has the tagger name in it. With this, the scripts can work without relying on the args input which tagger was used. The args options is still there but not with `--dips` or `--dl1`. Thats now the `-t` or `--tagger` option.
- Changing the `--dips` etc. to `--tagger dips` for `plotting_epoch_performance` and `evaluate_model.py`.
- Added another flag in the `train_config` to make the Learning Rate Reducer configurable. You can set all the parameters in the `NN_structure` if you want to. Otherwise the current hard-coded values are used as default.
- Renamed and moved the old `train_*.py` with the models and all inside to a folder called `models`. There you can change everything you like (just to clean up and sort everything a bit).
- Adapted the unit/integration tests.
- Added the changes to the docs.
closes https://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/issues/81Alexander FrochAlexander Frochhttps://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/132Adding calc_bins function to evaluation tools2021-08-04T15:16:03+02:00Alexander FrochAdding calc_bins function to evaluation toolsThis MR does the following things:
1: Adding functions `calc_bins` and `calc_ratio` which calculates the bins and their unc and also the ratio steps and their unc.
2: Adding the `flavour_colors`, `flavour_labels` and `hist_err_sty...This MR does the following things:
1: Adding functions `calc_bins` and `calc_ratio` which calculates the bins and their unc and also the ratio steps and their unc.
2: Adding the `flavour_colors`, `flavour_labels` and `hist_err_style` to the `global_config`.
3: Adding Ratio Uncertainties.
4: Adding small warning in the `plot_input_vars`.Alexander FrochAlexander Froch