class_docstr: Test ROCAUC visualizer
class_docstr_tok: ["Test","ROCAUC","visualizer"]
docstr: Test ROCAUC with binary classifiers that have a decision function
docstr_tok: ["Test","ROCAUC","with","binary","classifiers","that","have","a","decision","function"]
code: def test_binary_decision_function_rocauc(self):
      """
      Test ROCAUC with binary classifiers that have a decision function
      """
      # Load the model and assert there is no predict_proba method.
      model = LinearSVC()
      with pytest.raises(AttributeError):
          model.predict_proba
  
      # Fit model and visualizer
      visualizer = ROCAUC(model)
      visualizer.fit(self.binary.X.train, self.binary.y.train)
  
      # First 10 expected values in the y_scores
      first_ten_expected = np.asarray(
          [
              -0.092,
              0.019,
              -0.751,
              -0.838,
              0.183,
              -0.344,
              -1.019,
              2.203,
              1.415,
              -0.529,
          ]
      )
  
      # Get the predict_proba scores and evaluate
      y_scores = visualizer._get_y_scores(self.binary.X.train)
  
      # Check to see if the first 10 y_scores match the expected
      npt.assert_array_almost_equal(
          y_scores[:10], first_ten_expected, decimal=1
      )
  
imports: import pytest
  import numpy
  import numpy.testing
  from unittest.mock import patch
  from tests.base import VisualTestCase
  from yellowbrick.classifier.rocauc import *
  from yellowbrick.exceptions import ModelError
  from yellowbrick.datasets import load_occupancy
  from sklearn.svm import LinearSVC, SVC
  from sklearn.naive_bayes import GaussianNB
  from sklearn.linear_model import LogisticRegression
  from sklearn.base import BaseEstimator, ClassifierMixin
  from sklearn.model_selection import train_test_split
  from sklearn.ensemble import RandomForestClassifier, AdaBoostClassifier
  from sklearn.preprocessing import MinMaxScaler
  from sklearn.pipeline import Pipeline
label_desc: Use image node_id 18 for calling the TestROCAUC obj's underlying member method code with example usage: obj.test_binary_decision_function_rocauc() without return types