yandexdataschool/roc_comparison

Incorrect number of arguments in fastDeLong

martinkiik opened this issue · 2 comments

When calling delong_roc_variance(), it gives fastDeLong() 3 arguments while by definition fastDeLong() only accepts two.

This shouldn't be an issue since sample_weight = None, but the issue persists after even manually deleting the input ordered_sample_weight on line #137, e.g.:

>> auc, auc_cov = delong_roc_variance(Y_test, Y_pred)

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-191-031a16e7f474> in <module>

----> 5 auc, auc_cov = delong_roc_variance(Y_test, Y_pred)
      6 auc_std = np.sqrt(auc_cov)
      7 lower_upper_q = np.abs(np.array([0,1])-(1-alpha)/2)

~\path\roc_comparison-master\compare_auc_delong_xu.py in delong_roc_variance(ground_truth, predictions)
    135         ground_truth, sample_weight)
    136     predictions_sorted_transposed = predictions[np.newaxis, order]
--> 137     aucs, delongcov = fastDeLong(predictions_sorted_transposed, label_1_count)
    138     assert len(aucs) == 1, "There is a bug in the code, please forward this to the developers"
    139     return aucs[0], delongcov

TypeError: fastDeLong() takes 2 positional arguments but 3 were given


Have you found a solution?

Fixed in 7eab86b