class_docstr: Test the PrecisionRecallCurve visualizer
class_docstr_tok: ["Test","the","PrecisionRecallCurve","visualizer"]
docstr: Test that visualizer can handle sklearn pipeline as model input
docstr_tok: ["Test","that","visualizer","can","handle","sklearn","pipeline","as","model","input"]
code: def test_pipeline_as_model_input(self):
      """
      Test that visualizer can handle sklearn pipeline as model input
      """
      X, y = load_occupancy(return_dataset=True).to_pandas()
      classes = ["unoccupied", "occupied"]
  
      X_train, X_test, y_train, y_test = tts(
          X, y, test_size=0.2, shuffle=True, random_state=42
      )
  
      model = Pipeline(
          [("minmax", MinMaxScaler()), ("svc", SVC(random_state=42))]
      )
  
      oz = PrecisionRecallCurve(
          model,
          per_class=True,
          micro=False,
          fill_area=False,
          iso_f1_curves=True,
          ap_score=False,
          classes=classes,
      )
      oz.fit(X_train, y_train)
      oz.score(X_test, y_test)
      oz.finalize()
      self.assert_images_similar(oz, tol=5.5)
  
imports: import sys
  import pytest
  import matplotlib
  from yellowbrick.exceptions import *
  from yellowbrick.classifier.prcurve import *
  from yellowbrick.datasets import load_occupancy
  from tests.base import IS_WINDOWS_OR_CONDA, VisualTestCase
  from .test_rocauc import FakeClassifier
  from sklearn.svm import LinearSVC, SVC
  from sklearn.naive_bayes import GaussianNB
  from sklearn.datasets import make_regression
  from sklearn.tree import DecisionTreeClassifier
  from sklearn.linear_model import RidgeClassifier
  from sklearn.model_selection import train_test_split
  from sklearn.ensemble import RandomForestClassifier, AdaBoostClassifier
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import MinMaxScaler
label_desc: Use image node_id 18 for calling the TestPrecisionRecallCurve obj's underlying member method code with example usage: obj.test_pipeline_as_model_input() without return types