Skip to content
Snippets Groups Projects
Commit 6300dafe authored by Nikolai's avatar Nikolai
Browse files

make bins orthogonal in get_bin_centered_hist

parent 9db4ffce
No related branches found
No related tags found
No related merge requests found
...@@ -808,7 +808,7 @@ class ClassificationProject(object): ...@@ -808,7 +808,7 @@ class ClassificationProject(object):
if "weights" in np_kwargs: if "weights" in np_kwargs:
errors = [] errors = []
for left, right in zip(bins, bins[1:]): for left, right in zip(bins, bins[1:]):
indices = np.where((x >= left) & (x <= right))[0] indices = np.where((x >= left) & (x < right))[0]
sumw2 = np.sum(np_kwargs["weights"][indices]**2) sumw2 = np.sum(np_kwargs["weights"][indices]**2)
content = np.sum(np_kwargs["weights"][indices]) content = np.sum(np_kwargs["weights"][indices])
errors.append(math.sqrt(sumw2)/content) errors.append(math.sqrt(sumw2)/content)
...@@ -1085,7 +1085,7 @@ if __name__ == "__main__": ...@@ -1085,7 +1085,7 @@ if __name__ == "__main__":
#optimizer_opts=dict(lr=100., decay=1e-6, momentum=0.9), #optimizer_opts=dict(lr=100., decay=1e-6, momentum=0.9),
earlystopping_opts=dict(monitor='val_loss', earlystopping_opts=dict(monitor='val_loss',
min_delta=0, patience=2, verbose=0, mode='auto'), min_delta=0, patience=2, verbose=0, mode='auto'),
selection="lep1Pt<5000", # cut out a few very weird outliers selection="1",
branches = ["met", "mt"], branches = ["met", "mt"],
weight_expr = "eventWeight*genWeight", weight_expr = "eventWeight*genWeight",
identifiers = ["DatasetNumber", "EventNumber"], identifiers = ["DatasetNumber", "EventNumber"],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment