diff --git a/yellowbrick/regressor/influence.py b/yellowbrick/regressor/influence.py index 7ba3a8af0..220b044ff 100644 --- a/yellowbrick/regressor/influence.py +++ b/yellowbrick/regressor/influence.py @@ -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 @@ -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