roc() crashes when called without a selection
>>> roc(out, p_signal, p_bkg, 'pred_is_vbf', axes=ax)
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-59-17f6f9ace8c6> in <module>
3 import matplotlib.pyplot as plt
4 fig, ax = plt.subplots()
----> 5 roc(out, p_signal, p_bkg, 'pred_is_vbf', axes=ax)
~/repositories/httnn/lib/python3.5/site-packages/nnfwtbn/plot.py in roc(df, signal_process, background_process, discriminant, steps, selection, min, max, axes, weight)
352 max = discriminant(df).max()
353
--> 354 df = df[selection(df)]
355
356 signal_effs = []
~/repositories/httnn/lib/python3.5/site-packages/nnfwtbn/cut.py in __call__(self, dataframe)
77 return pd.Series(np.ones(len(dataframe), dtype='bool'))
78
---> 79 return self.func(dataframe)
80
81 def select(self, dataframe):
~/repositories/httnn/lib/python3.5/site-packages/nnfwtbn/plot.py in <lambda>(d)
340 # Handle selection
341 if selection is None:
--> 342 selection = Cut(lambda d: variable(d) * 0 == 0)
343 elif not isinstance(selection, Cut):
344 selection = Cut(selection)
NameError: name 'variable' is not defined
Edited by Frank Sauerburger