Skip to content

Commit

Permalink
Fix pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
saganatt committed Oct 3, 2024
1 parent abbb291 commit 1c8e677
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions machine_learning_hep/optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
from ROOT import TH1F, TFile # pylint: disable=import-error,no-name-in-module
from machine_learning_hep.logger import get_logger

def select_by_threshold(df, label, thr, name):
def select_by_threshold(df_label, label, thr, name):
# Changed from >= to > since we use that atm for the nominal selection
# See processer.py self.l_selml
if label == "bkg":
return df[df[f'y_test_prob{name}{label}'].values <= thr]
return df_label[df_label[f'y_test_prob{name}{label}'].values <= thr]
if label == "":
return df[df[f'y_test_prob{name}{label}'].values > thr]
return df[df[f'y_test_prob{name}{label}'].values >= thr]
return df_label[df_label[f'y_test_prob{name}{label}'].values > thr]
return df_label[df_label[f'y_test_prob{name}{label}'].values >= thr]

def get_x_axis(num_steps, class_label):
ns_left = int(num_steps / 10) - 1
Expand Down

0 comments on commit 1c8e677

Please sign in to comment.