class_docstr: CooksDistance visual test cases
class_docstr_tok: ["CooksDistance","visual","test","cases"]
docstr: Test image similarity of Cook's Distance on a random dataset
docstr_tok: ["Test","image","similarity","of","Cook","'s","Distance","on","a","random","dataset"]
code: def test_cooks_distance(self):
      """
      Test image similarity of Cook's Distance on a random dataset
      """
      _, ax = plt.subplots()
      viz = CooksDistance(ax=ax)
  
      assert_not_fitted(viz)
      assert viz.fit(self.data.X, self.data.y) is viz
      assert_fitted(viz)
  
      # Test fitted values
      assert viz.distance_.shape == (self.data.X.shape[0],)
      assert viz.p_values_.shape == viz.distance_.shape
      assert 0.0 <= viz.influence_threshold_ <= 4.0
      assert 0.0 <= viz.outlier_percentage_ <= 100.0
  
      self.assert_images_similar(viz)
  
file_path: yellowbrick/tests/test_regressor/test_influence.py
imports: import pytest
  import numpy
  import matplotlib.pyplot
  from tests.base import VisualTestCase
  from tests.fixtures import Dataset
  from sklearn.datasets import make_regression
  from yellowbrick.regressor.influence import *
  from yellowbrick.datasets import load_concrete
label_desc: Use image node_id 1 for calling the TestCooksDistance obj's underlying member method code with example usage: obj.test_cooks_distance() without return types