The following example contains two cases that raise the exception shown below. I am not sure if it happens only when there is only one positive sample and it has the lowest output score. Need to investigate further.
Traceback (most recent call last):
File "test_exception.py", line 33, in <module>
prg_curve = prg.create_prg_curve(y_true, scores)
File "/home/miquel/git/uob/conditional_sampler/venv/lib/python3.6/site-packages/prg/prg.py", line 212, in create_prg_curve
points = _create_crossing_points(points, n_pos, n_neg)
File "/home/miquel/git/uob/conditional_sampler/venv/lib/python3.6/site-packages/prg/prg.py", line 126, in _create_crossing_points
j = np.amin(np.where(points['recall_gain'] >= 0)[0])
File "<__array_function__ internals>", line 6, in amin
File "/home/miquel/git/uob/conditional_sampler/venv/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 2831, in amin
keepdims=keepdims, initial=initial, where=where)
File "/home/miquel/git/uob/conditional_sampler/venv/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 87, in _wrapreduction
return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
ValueError: zero-size array to reduction operation minimum which has no identity
The following example contains two cases that raise the exception shown below. I am not sure if it happens only when there is only one positive sample and it has the lowest output score. Need to investigate further.
Raised exception