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

[WIP] Remove deprecated Matplotlib stem() parameter - Fixes #1314 #1322

Open
wants to merge 1 commit into
base: develop
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
7 changes: 4 additions & 3 deletions yellowbrick/regressor/influence.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def fit(self, X, y):

# Compute Cook's distance
residuals_studentized = residuals / np.sqrt(mse) / np.sqrt(1 - leverage)
self.distance_ = residuals_studentized ** 2 / X.shape[1]
self.distance_ = residuals_studentized**2 / X.shape[1]
self.distance_ *= leverage / (1 - leverage)

# Compute the p-values of Cook's Distance
Expand All @@ -180,8 +180,9 @@ 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,
use_line_collection=True
self.distance_,
linefmt=self.linefmt,
markerfmt=self.markerfmt,
)

# No padding on either side of the instance index
Expand Down
Loading