Commit 48f80bd3 authored by Joschka Birk's avatar Joschka Birk
Browse files

Updated docstrings

parent 2ab05f8e
Pipeline #3469490 passed with stages
in 10 minutes and 49 seconds
......@@ -17,26 +17,35 @@ from umami.train_tools import get_class_label_ids, get_class_label_variables
def CompTaggerRejectionDict(
file,
file: str,
tagger_comp_var: list,
recommended_frac_dict: dict,
WP: float,
class_labels: list,
main_class: str,
):
"""
Load the comparison tagger probability variables from the validation
"""Load the comparison tagger probability variables from the validation
file and calculate the rejections.
Input:
- file: Filepath to validation file.
- tagger_comp_var: List of the comparison tagger probability variable names.
- recommended_frac_dict: Dict with the fractions.
- class_labels: List with the used class_labels.
- main_class: The main discriminant class. For b-tagging obviously "bjets"
Output:
- Dict with the rejections for against the main class for all given flavours.
Parameters
----------
file : str
Filename of the validation file.
tagger_comp_var : list
List of the comparison tagger probability variable names.
recommended_frac_dict : dict
Dict with the fractions.
WP : float
Working point at which the rejections should be evaluated.
class_labels : list
List with the used class_labels.
main_class : str
The main discriminant class. For b-tagging obviously "bjets"
Returns
-------
dict
Dict with the rejections for against the main class for all given flavours.
"""
# Get class_labels variables
......@@ -107,27 +116,40 @@ def PlotDiscCutPerEpoch(
plot_datatype: str = "pdf",
**kwargs, # pylint: disable=unused-argument
):
"""
Plot the discriminant cut value for a specific working point
"""Plot the discriminant cut value for a specific working point
over all epochs.
Input:
- df_results: Dict with the epochs and disc cuts.
- plot_name: Path where the plots is saved + plot name.
- frac_class: Define which fraction is shown in ATLAS Tag.
- target_beff: Working Point to use.
- frac: Fraction value for ATLAS Tag.
- UseAtlasTag: Define if ATLAS Tag is used or not.
- ApplyATLASStyle: Apply ATLAS Style of the plot (for approval etc.).
- AtlasTag: Main tag. Mainly "Internal Simulation".
- SecondTag: Lower tag in the ATLAS label with infos.
- yAxisAtlasTag: Y axis position of the ATLAS label.
- yAxisIncrease: Y axis increase factor to fit the ATLAS label.
- ncol: Number of columns in the legend.
- plot_datatype: Datatype of the plot.
Output:
- Discriminant Cut per epoch plotted.
Parameters
----------
df_results : dict
Dict with the epochs and disc cuts.
plot_name : str
Path where the plots is saved + plot name.
frac_class : str
Define which fraction is shown in ATLAS Tag.
trained_taggers : list, optional
List of trained taggers, by default None
target_beff : float, optional
Working Point to use, by default 0.77
frac : float, optional
Fraction value for ATLAS Tag, by default 0.018
UseAtlasTag : bool, optional
Define if ATLAS Tag is used or not, by default True
ApplyATLASStyle : bool, optional
Apply ATLAS Style of the plot (for approval etc.), by default True
AtlasTag : str, optional
Main tag. Mainly "Internal Simulation", by default "Internal Simulation"
SecondTag : str, optional
Lower tag in the ATLAS label with infos,
by default :math:`"\n$\\sqrt{s}=13$ TeV, PFlow jets"`
yAxisAtlasTag : float, optional
Y axis position of the ATLAS label, by default 0.9
yAxisIncrease : float, optional
Y axis increase factor to fit the ATLAS label, by default 1.3
ncol : int, optional
Number of columns in the legend, by default 1
plot_datatype : str, optional
Datatype of the plot, by default "pdf"
"""
# Apply ATLAS style
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment