Open perellonieto opened 4 years ago
The returned types for function calc_auprg are not consitent, it may be convenient to force and return always floats.
from prg import prg import numpy as np y_true = np.array([0, 0, 1, 1], dtype='int') scores = np.arange(4, 1, -1) prg_curve = prg.create_prg_curve(y_true, scores) auprg = prg.calc_auprg(prg_curve) print(auprg) print(type(auprg)) y_true = np.array([0, 1, 0], dtype='int') scores = np.arange(3, 1, -1) prg_curve = prg.create_prg_curve(y_true, scores) auprg = prg.calc_auprg(prg_curve) print(auprg) print(type(auprg))
Output
0 <class 'int'> 0.0 <class 'numpy.float64'>
The returned types for function calc_auprg are not consitent, it may be convenient to force and return always floats.
Output