Umami merge requestshttps://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests2022-01-27T19:28:09+01:00https://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/339Adding more flexibility for validation and test file usage2022-01-27T19:28:09+01:00Manuel GuthAdding more flexibility for validation and test file usageThis is a kind of epic MR collecting intermediate changes towards the resolution of the issue
Closes #112This is a kind of epic MR collecting intermediate changes towards the resolution of the issue
Closes #112Manuel GuthManuel Guthhttps://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/346Pylint improvements2022-01-19T11:12:19+01:00Manuel GuthPylint improvementsadresses #105adresses #105https://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/348restructure umami to remove tf dependencies for plotting2022-01-21T13:46:33+01:00Philipp Gadowrestructure umami to remove tf dependencies for plottingThis MR moves some functions around to avoid tensor-flow dependencies for plotting related tasks.
It also modifies the output of the `plot_input_variables.py` script to remove the hard-coded prefix.This MR moves some functions around to avoid tensor-flow dependencies for plotting related tasks.
It also modifies the output of the `plot_input_variables.py` script to remove the hard-coded prefix.Philipp GadowPhilipp Gadowhttps://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/350Merging Master2022-01-19T11:30:39+01:00Alexander FrochMerging MasterAlexander FrochAlexander Frochhttps://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/351Merge Master in Validation remake branch2022-01-19T11:46:37+01:00Alexander FrochMerge Master in Validation remake branchAlexander FrochAlexander Frochhttps://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/362Merging master in protected branch2022-01-21T14:44:14+01:00Alexander FrochMerging master in protected branchhttps://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/363Merge master2022-01-21T15:49:02+01:00Alexander FrochMerge masterMerging master in protected branchMerging master in protected branchAlexander FrochAlexander Frochhttps://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/374Merge master in protected branch2022-01-27T11:13:37+01:00Alexander FrochMerge master in protected branchThis MR adds the current master to `112-flexible-validation-test-file-definition`This MR adds the current master to `112-flexible-validation-test-file-definition`Alexander FrochAlexander Frochhttps://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/379Renaming DIPS Cond Att to CADS + Adding option to load optimiser2022-01-28T16:33:38+01:00Alexander FrochRenaming DIPS Cond Att to CADS + Adding option to load optimiserThis MR does the following:
* Renaming all Dips Cond att things to CADS.
* If a model is now loaded (for continuing the training), the optimizer is now also loaded correctly and not freshly compiled.
* Adding the `load_optimiser` option...This MR does the following:
* Renaming all Dips Cond att things to CADS.
* If a model is now loaded (for continuing the training), the optimizer is now also loaded correctly and not freshly compiled.
* Adding the `load_optimiser` option (per default `True`). When loading a model, you can decide if the optimiser is loaded from the model file (for continuing a training) or a new optimiser is initialised (use the model as start point for a new training).
* Documentation for the new `load_optimiser` option is added.Alexander FrochAlexander Frochhttps://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/385doc string improvements2022-02-02T18:58:14+01:00Manuel Guthdoc string improvementshttps://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/390Adding fraction contour plots2022-02-09T13:50:40+01:00Alexander FrochAdding fraction contour plotsThis MR adds the following:
- [x] Update `plotting_umami` documentation (Changing String -> `str` and so on).
- [x] Adding new evaluation function `GetRejectionPerFractionDict` which calculates the rejections for a given working point f...This MR adds the following:
- [x] Update `plotting_umami` documentation (Changing String -> `str` and so on).
- [x] Adding new evaluation function `GetRejectionPerFractionDict` which calculates the rejections for a given working point for all combinations of fraction values for the background classes.
- [x] Adding a new helper function `calculate_fraction_dict` which calculates all possible fraction permutations (Check if they add up to 1).
- [x] Adding unit test for the helper function.
- [x] Adding documentation how to steer `GetRejectionPerFractionDict`.
- [x] Adding new plot type `Frac_Contour`. The results from `GetRejectionPerFractionDict` can be plotted for two rejections (if other rejections are present, you need to fix them to a specific value).
- [x] Adding documentation for new `Frac_Contour` plot.
- [x] Adding unit test for new plot type `Frac_Contour`.
- [x] Adding new plot type `Frac_Contour` to the plots produced in the integration test.Alexander FrochAlexander Frochhttps://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/413Adding rejection and efficiency function and plotting examples2022-02-14T11:22:20+01:00Manuel GuthAdding rejection and efficiency function and plotting examplesThis MR adds
- `calc_eff` and `calc_rej`
- more plotting docs with examplesThis MR adds
- `calc_eff` and `calc_rej`
- more plotting docs with exampleshttps://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/414Use multiple signal classes2022-03-25T12:08:25+01:00Alexander FrochUse multiple signal classes## Summary
This MR introduces the following changes
* Support for multiple signal classes. You can now give a list for `main_class` which allows you to use multiple classes as signal.
* Fixing an issue described in !486 with the `plott...## Summary
This MR introduces the following changes
* Support for multiple signal classes. You can now give a list for `main_class` which allows you to use multiple classes as signal.
* Fixing an issue described in !486 with the `plotting_epoch_performance` script.
## 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_code/)Alexander FrochAlexander Frochhttps://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/415Add normalization option to input plotting2022-02-14T18:19:52+01:00Frederic RennerAdd normalization option to input plottinghttps://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/419Updating packaging and small issues2022-02-15T12:55:12+01:00Manuel GuthUpdating packaging and small issuesThis MR updates some small issues with packaging and now switches to `pip` instead of `python setup.py install/develop`
closes #131This MR updates some small issues with packaging and now switches to `pip` instead of `python setup.py install/develop`
closes #131https://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/430Fixing all issues of darglint and removing unused functions2022-02-16T16:50:23+01:00Alexander FrochFixing all issues of darglint and removing unused functionsThis MR fixes all `darglint` issues and removes the `MakePlots` and `Plot_vars` fuctions (outdated). Related to #61 and #145
The file `umami/train_tools/Plotting.py` is now excluded from darglint due to issues of darglint with the sphi...This MR fixes all `darglint` issues and removes the `MakePlots` and `Plot_vars` fuctions (outdated). Related to #61 and #145
The file `umami/train_tools/Plotting.py` is now excluded from darglint due to issues of darglint with the sphinx documentation style in the docstrings
closes https://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/issues/97 #145Alexander FrochAlexander Frochhttps://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/434plotting API for eff vs variable plots2022-03-23T14:49:51+01:00Manuel Guthplotting API for eff vs variable plotsThis MR adds the API for variable vs efficiency/rejection plots.
The following changes are introduced:
- renaming `plotPtdependence` to `plot_pt_dependence`
- removing the options `SWP_Comparison`, `SWP_label_list`, `Passed`, `Ratio_Cut`...This MR adds the API for variable vs efficiency/rejection plots.
The following changes are introduced:
- renaming `plotPtdependence` to `plot_pt_dependence`
- removing the options `SWP_Comparison`, `SWP_label_list`, `Passed`, `Ratio_Cut`, `frameon` from `plotPtdependence`, which should be used via the API
- fixing the mapping from old keywords to new keywords (did not work properly before)
- se font size by default to `12` and if `leg_fontsize` or `atlas_fontsize` are not defined will be replaced with `fontsize`
the new pT plots look now like this
[pt_light_rej.pdf](/uploads/9d24e8353256a0763848cc20ac23ecd7/pt_light_rej.pdf)https://gitlab.cern.ch/atlas-flavor-tagging-tools/algorithms/umami/-/merge_requests/435Fixing LRR issue and define validation n_jets and WP2022-02-18T11:54:43+01:00Alexander FrochFixing LRR issue and define validation n_jets and WPThis MR adds the following:
* Adding a validation specific `n_jets` and `WP` to the train configs (It is backward compatible). Documentation is added.
* Fixing an issue when disabling the Learning Rate Reducer (is fixed with a list wher...This MR adds the following:
* Adding a validation specific `n_jets` and `WP` to the train configs (It is backward compatible). Documentation is added.
* Fixing an issue when disabling the Learning Rate Reducer (is fixed with a list where the callbacks are appended to when they are initialized).
* Adapting the `plotting_epoch_performance.py` script. Per default, the validation json which is created with the `MyCallback` function is used when no argument (except the `-c`) is given (based on the parameters inside the train config).
* The `--dict` option in `plotting_epoch_performance.py` is still available. With this, you can use a validation json which not fits (name-wise).
* Added the `--recalculate` flag to `plotting_epoch_performance.py` which is now the command to recalculate the validation json.Alexander FrochAlexander Froch