class_docstr: Test ResidualPlot visualizer
class_docstr_tok: ["Test","ResidualPlot","visualizer"]
docstr: Test NumPy real world dataset with image similarity on Lasso
docstr_tok: ["Test","NumPy","real","world","dataset","with","image","similarity","on","Lasso"]
code: def test_residuals_plot_numpy(self):
      """
      Test NumPy real world dataset with image similarity on Lasso
      """
      _, ax = plt.subplots()
  
      # Load the occupancy dataset from fixtures
      data = load_energy(return_dataset=True)
      X, y = data.to_numpy()
  
      # Create train/test splits
      splits = tts(X, y, test_size=0.2, random_state=231)
      X_train, X_test, y_train, y_test = splits
  
      visualizer = ResidualsPlot(Lasso(random_state=44), ax=ax)
      visualizer.fit(X_train, y_train)
      visualizer.score(X_test, y_test)
      visualizer.finalize()
  
      self.assert_images_similar(visualizer, tol=1.5)
  
imports: import sys
  import pytest
  import matplotlib
  import matplotlib.pyplot
  from yellowbrick.datasets import load_energy
  from yellowbrick.exceptions import YellowbrickValueError
  from yellowbrick.regressor.residuals import ResidualsPlot, residuals_plot
  from unittest import mock
  from tests.fixtures import Dataset, Split
  from tests.base import IS_WINDOWS_OR_CONDA, VisualTestCase
  from sklearn.datasets import make_regression
  from sklearn.linear_model import Ridge, Lasso
  from sklearn.neural_network import MLPRegressor
  from sklearn.linear_model import LinearRegression
  from sklearn.model_selection import train_test_split
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import MinMaxScaler
label_desc: Use image node_id 11 for calling the TestResidualsPlot obj's underlying member method code with example usage: obj.test_residuals_plot_numpy() without return types