We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent df0aa1c commit bb141c6Copy full SHA for bb141c6
1 file changed
chamois/predictor/information.py
@@ -40,7 +40,7 @@ def information_accretion(
40
tot = _Y.shape[0]
41
if tot > 0 and pos > 0:
42
freq[i] = pos / tot
43
- return -numpy.log2(freq, where=freq != 0.0)
+ return -numpy.log2(freq, where=freq != 0.0, out=numpy.zeros_like(freq))
44
45
46
def remaining_uncertainty_score(y_true, y_pred, information_accretion):
0 commit comments