Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix importError of obsolete scipy.interp with scipy.interpolate #120

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions scikitplot/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from sklearn.calibration import calibration_curve
from sklearn.utils import deprecated

from scipy import interp
from scipy import interpolate

from scikitplot.helpers import binary_ks_curve, validate_labels
from scikitplot.helpers import cumulative_gain_curve
Expand Down Expand Up @@ -281,7 +281,7 @@ def plot_roc_curve(y_true, y_probas, title='ROC Curves',
# Then interpolate all ROC curves at this points
mean_tpr = np.zeros_like(all_fpr)
for i in range(len(classes)):
mean_tpr += interp(all_fpr, fpr[i], tpr[i])
mean_tpr += interpolate(all_fpr, fpr[i], tpr[i])

# Finally average it and compute AUC
mean_tpr /= len(classes)
Expand Down Expand Up @@ -440,7 +440,7 @@ def plot_roc(y_true, y_probas, title='ROC Curves',
# Then interpolate all ROC curves at this points
mean_tpr = np.zeros_like(all_fpr)
for i in range(len(classes)):
mean_tpr += interp(all_fpr, fpr_dict[i], tpr_dict[i])
mean_tpr += interpolate(all_fpr, fpr_dict[i], tpr_dict[i])

# Finally average it and compute AUC
mean_tpr /= len(classes)
Expand Down