class_docstr: Test the PrecisionRecallCurve visualizer
class_docstr_tok: ["Test","the","PrecisionRecallCurve","visualizer"]
docstr: Visual similarity of binary classifier with a decision function
docstr_tok: ["Visual","similarity","of","binary","classifier","with","a","decision","function"]
code: def test_binary_decision(self):
      """
      Visual similarity of binary classifier with a decision function
      """
      # Create and fit the visualizer
      oz = PrecisionRecallCurve(LinearSVC(random_state=232))
      assert_not_fitted(oz)
  
      # Fit returns self
      assert oz.fit(self.binary.X.train, self.binary.y.train) is oz
  
      # Score the visualizer
      s = oz.score(self.binary.X.test, self.binary.y.test)
      assert_fitted(oz)
  
      # Score should be between 0 and 1
      assert 0.0 <= s <= 1.0
  
      # Check the binary classification properties
      assert oz.target_type_ == BINARY
      assert isinstance(oz.score_, float)
      assert oz.score_ == s
      assert isinstance(oz.precision_, np.ndarray)
      assert isinstance(oz.recall_, np.ndarray)
  
      # Compare the images
      # NOTE: do not finalize image to ensure tests pass on Travis
      # Fails with 3.083 on Travis-CI (passes on AppVeyor)
      self.assert_images_similar(oz, tol=3.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 5 for calling the TestPrecisionRecallCurve obj's underlying member method code with example usage: obj.test_binary_decision() without return types