class_docstr: Test the PredictionError visualizer
class_docstr_tok: ["Test","the","PredictionError","visualizer"]
docstr: Test that visualizer can be accessed within a sklearn pipeline
docstr_tok: ["Test","that","visualizer","can","be","accessed","within","a","sklearn","pipeline"]
code: def test_within_pipeline_quickmethod(self):
      """
      Test that visualizer can be accessed within a sklearn pipeline
      """
      X, y = load_concrete()
      X_train, X_test, y_train, y_test = tts(
          X, y, test_size=0.2, random_state=42
      )
  
      model = Pipeline(
          [
              (
                  "imputer",
                  SimpleImputer(missing_values=np.nan, strategy="mean"),
              ),
              ("pe", PredictionError(Lasso())),
          ]
      )
  
      model.fit(X_train, y_train)
      model.score(X_test, y_test)
      model["pe"].finalize()
      self.assert_images_similar(model["pe"], tol=2.0)
  
imports: import pytest
  import matplotlib.pyplot
  import numpy
  from unittest import mock
  from tests.fixtures import Dataset, Split
  from tests.base import IS_WINDOWS_OR_CONDA, VisualTestCase
  from yellowbrick.datasets import load_energy, load_concrete
  from yellowbrick.regressor.prediction_error import PredictionError, prediction_error
  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.impute import SimpleImputer
label_desc: Use image node_id 13 for calling the TestPredictionError obj's underlying member method code with example usage: obj.test_within_pipeline_quickmethod() without return types