class_docstr: Pre-predict contrib tests.
docstr: Test the prepredict estimator with a prediction error plot
docstr_tok: ["Test","the","prepredict","estimator","with","a","prediction","error","plot"]
code: def test_prepredict_regressor(self):
      """
      Test the prepredict estimator with a prediction error plot
      """
      # Make prepredictions
      X, y = self.continuous.X, self.continuous.y
      y_pred = LinearRegression().fit(X.train, y.train).predict(X.test)
  
      # Create prepredict estimator with prior predictions
      estimator = PrePredict(y_pred, REGRESSOR)
      assert estimator.fit(X.train, y.train) is estimator
      assert estimator.predict(X.train) is y_pred
      assert estimator.score(X.test, y.test) == pytest.approx(
          0.9999983124154966, rel=1e-2
      )
  
      # Test that a visualizer works with the pre-predictions.
      viz = PredictionError(estimator)
      viz.fit(X.train, y.train)
      viz.score(X.test, y.test)
      viz.finalize()
  
      self.assert_images_similar(viz, tol=10.0)
  
imports: import pytest
  from io import BytesIO
  from tests.fixtures import Dataset, Split
  from tests.base import IS_WINDOWS_OR_CONDA, VisualTestCase
  from sklearn.naive_bayes import GaussianNB
  from sklearn.cluster import MiniBatchKMeans
  from sklearn.linear_model import LinearRegression
  from sklearn.model_selection import train_test_split
  from sklearn.datasets import make_classification, make_regression, make_blobs
  from yellowbrick.contrib.prepredict import *
  from yellowbrick.regressor import PredictionError
  from yellowbrick.classifier import ClassificationReport
  import numpy
label_desc: Use image node_id 2 for calling the TestPrePrePredictEstimator obj's underlying member method code with example usage: obj.test_prepredict_regressor() without return types