class_docstr: Test the LearningCurve visualizer
docstr: Test that visualizer quickmethod can be accessed within a
  sklearn pipeline
docstr_tok: ["Test","that","visualizer","quickmethod","can","be","accessed","within","a","sklearn","pipeline"]
code: def test_within_pipeline_quickmethod(self):
      """
      Test that visualizer quickmethod can be accessed within a
      sklearn pipeline
      """
      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"),
              ),
              (
                  "lc",
                  learning_curve(
                      MultinomialNB(),
                      X,
                      y,
                      cv=cv,
                      scoring="f1_weighted",
                      train_sizes=sizes,
                      n_jobs=4,
                      random_state=42,
                  ),
              ),
          ]
      )
      model["lc"].finalize()
      self.assert_images_similar(model["lc"], 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 11 for calling the TestLearningCurve obj's underlying member method code with example usage: obj.test_within_pipeline_quickmethod() without return types