Repository: DistrictDataLabs/yellowbrick

Issue:
Update classification metrics import to prevent deprecation
> FutureWarning: The sklearn.metrics.classification module is  deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.metrics. Anything that cannot be imported from sklearn.metrics is now part of the private API.
Update classification metrics import to prevent deprecation
> FutureWarning: The sklearn.metrics.classification module is  deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.metrics. Anything that cannot be imported from sklearn.metrics is now part of the private API.


Discussion:

Resolving patch:
diff --git a/yellowbrick/classifier/class_prediction_error.py b/yellowbrick/classifier/class_prediction_error.py
--- a/yellowbrick/classifier/class_prediction_error.py
+++ b/yellowbrick/classifier/class_prediction_error.py
@@ -21,7 +21,7 @@
 import numpy as np
 
 from sklearn.utils.multiclass import unique_labels
-from sklearn.metrics.classification import _check_targets
+from sklearn.metrics._classification import _check_targets
 
 from yellowbrick.draw import bar_stack
 from yellowbrick.classifier.base import ClassificationScoreVisualizer
diff --git a/yellowbrick/classifier/rocauc.py b/yellowbrick/classifier/rocauc.py
--- a/yellowbrick/classifier/rocauc.py
+++ b/yellowbrick/classifier/rocauc.py
@@ -21,7 +21,6 @@
 
 import numpy as np
 
-from scipy import interp
 from sklearn.metrics import auc, roc_curve
 from sklearn.preprocessing import label_binarize
 from sklearn.utils.multiclass import type_of_target
@@ -497,7 +496,7 @@ def _score_macro_average(self, n_classes):
 
         # Compute the averages per class
         for i in range(n_classes):
-            avg_tpr += interp(all_fpr, self.fpr[i], self.tpr[i])
+            avg_tpr += np.interp(all_fpr, self.fpr[i], self.tpr[i])
 
         # Finalize the average
         avg_tpr /= n_classes
diff --git a/yellowbrick/regressor/influence.py b/yellowbrick/regressor/influence.py
--- a/yellowbrick/regressor/influence.py
+++ b/yellowbrick/regressor/influence.py
@@ -180,7 +180,8 @@ def draw(self):
         """
         # Draw a stem plot with the influence for each instance
         _, _, baseline = self.ax.stem(
-            self.distance_, linefmt=self.linefmt, markerfmt=self.markerfmt
+            self.distance_, linefmt=self.linefmt, markerfmt=self.markerfmt,
+            use_line_collection=True
         )
 
         # No padding on either side of the instance index


Test patch:
diff --git a/tests/baseline_images/test_regressor/test_influence/test_cooks_distance.png b/tests/baseline_images/test_regressor/test_influence/test_cooks_distance.png
Binary files a/tests/baseline_images/test_regressor/test_influence/test_cooks_distance.png and b/tests/baseline_images/test_regressor/test_influence/test_cooks_distance.png differ
diff --git a/tests/baseline_images/test_regressor/test_influence/test_cooks_distance_quickmethod.png b/tests/baseline_images/test_regressor/test_influence/test_cooks_distance_quickmethod.png
Binary files a/tests/baseline_images/test_regressor/test_influence/test_cooks_distance_quickmethod.png and b/tests/baseline_images/test_regressor/test_influence/test_cooks_distance_quickmethod.png differ
diff --git a/tests/baseline_images/test_regressor/test_influence/test_numpy_integration.png b/tests/baseline_images/test_regressor/test_influence/test_numpy_integration.png
Binary files a/tests/baseline_images/test_regressor/test_influence/test_numpy_integration.png and b/tests/baseline_images/test_regressor/test_influence/test_numpy_integration.png differ
diff --git a/tests/baseline_images/test_regressor/test_influence/test_pandas_integration.png b/tests/baseline_images/test_regressor/test_influence/test_pandas_integration.png
Binary files a/tests/baseline_images/test_regressor/test_influence/test_pandas_integration.png and b/tests/baseline_images/test_regressor/test_influence/test_pandas_integration.png differ
diff --git a/tests/test_classifier/test_threshold.py b/tests/test_classifier/test_threshold.py
--- a/tests/test_classifier/test_threshold.py
+++ b/tests/test_classifier/test_threshold.py
@@ -29,7 +29,7 @@
 
 from unittest.mock import patch
 from tests.base import VisualTestCase
-from numpy.testing.utils import assert_array_equal
+from numpy.testing import assert_array_equal
 
 from sklearn.base import ClassifierMixin
 from sklearn.svm import LinearSVC, NuSVC
diff --git a/tests/test_cluster/test_elbow.py b/tests/test_cluster/test_elbow.py
--- a/tests/test_cluster/test_elbow.py
+++ b/tests/test_cluster/test_elbow.py
@@ -23,7 +23,7 @@
 import matplotlib.pyplot as plt
 
 from scipy.sparse import csc_matrix, csr_matrix
-from numpy.testing.utils import assert_array_almost_equal
+from numpy.testing import assert_array_almost_equal
 
 from sklearn.datasets import make_blobs
 from sklearn.cluster import KMeans, MiniBatchKMeans
diff --git a/tests/test_regressor/test_alphas.py b/tests/test_regressor/test_alphas.py
--- a/tests/test_regressor/test_alphas.py
+++ b/tests/test_regressor/test_alphas.py
@@ -22,7 +22,7 @@
 import numpy as np
 
 from tests.base import VisualTestCase
-from numpy.testing.utils import assert_array_equal
+from numpy.testing import assert_array_equal
 
 from yellowbrick.datasets import load_energy
 from yellowbrick.exceptions import YellowbrickTypeError