class_docstr: Test ROCAUC visualizer
class_docstr_tok: ["Test","ROCAUC","visualizer"]
docstr: Test ROCAUC with a target whose classes are unencoded strings before scoring
docstr_tok: ["Test","ROCAUC","with","a","target","whose","classes","are","unencoded","strings","before","scoring"]
code: def test_rocauc_not_label_encoded(self):
      """
      Test ROCAUC with a target whose classes are unencoded strings before scoring
      """
      # Map numeric targets to strings
      classes = {0: "a", 1: "b", 2: "c", 3: "d", 4: "e", 5: "f"}
      y_train = np.array(
          [classes[yi] for yi in self.multiclass.y.train]
      )
      y_test = np.array([classes[yi] for yi in self.multiclass.y.test])
  
      # Create and fit the visualizer
      visualizer = ROCAUC(LogisticRegression())
      visualizer.fit(self.multiclass.X.train, y_train)
  
      # Confirm that y_train and y_test have the same targets before calling score
      assert set(y_train) == set(y_test)
  
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 17 for calling the TestROCAUC obj's underlying member method code with example usage: obj.test_rocauc_not_label_encoded() without return types