class_docstr: Test the LearningCurve visualizer
docstr: Test that visualizer can handle sklearn pipeline as model input
  within a quickmethod
docstr_tok: ["Test","that","visualizer","can","handle","sklearn","pipeline","as","model","input","within","a","quickmethod"]
code: def test_pipeline_as_model_input_quickmethod(self):
      """
      Test that visualizer can handle sklearn pipeline as model input
      within a quickmethod
      """
      X, y = load_game()
  
      # Encode the categorical data
      X = OneHotEncoder().fit_transform(X)
      y = LabelEncoder().fit_transform(y)
  
      # Create the learning curve visualizer
      cv = StratifiedKFold(n_splits=12)
      sizes = np.linspace(0.3, 1.0, 10)
  
      model = Pipeline(
          [
              (
                  "imputer",
                  SimpleImputer(missing_values=np.nan, strategy="mean"),
              ),
              ("nb", MultinomialNB()),
          ]
      )
  
      oz = learning_curve(
          model,
          X,
          y,
          cv=cv,
          scoring="f1_weighted",
          train_sizes=sizes,
          n_jobs=4,
          random_state=42,
      )
      self.assert_images_similar(oz, tol=2.0)
  
imports: import sys
  import pytest
  import numpy
  from unittest.mock import patch
  from tests.base import VisualTestCase
  from sklearn.svm import LinearSVC
  from sklearn.linear_model import Ridge
  from sklearn.naive_bayes import GaussianNB, MultinomialNB
  from sklearn.cluster import MiniBatchKMeans
  from sklearn.preprocessing import OneHotEncoder, LabelEncoder
  from sklearn.impute import SimpleImputer
  from sklearn.model_selection import ShuffleSplit
  from sklearn.model_selection import StratifiedKFold
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.pipeline import Pipeline
  from yellowbrick.datasets import load_mushroom, load_game
  from yellowbrick.model_selection.learning_curve import *
label_desc: Use image node_id 13 for calling the TestLearningCurve obj's underlying member method code with example usage: obj.test_pipeline_as_model_input_quickmethod() without return types