docstr: Creates and pickles a toy scikit-learn model.
  
  Args:
      eval_export_dir: Directory to store a pickled scikit-learn model. This
          directory is created if it does not exist.
docstr_tok: ["Creates","and","pickles","a","toy","scikit-learn","model",".","Args",":","eval_export_dir",":","Directory","to","store","a","pickled","scikit-learn","model",".","This","directory","is","created","if","it","does","not","exist","."]
code: def _create_sklearn_model(self, eval_export_dir):
      """Creates and pickles a toy scikit-learn model.
  
      Args:
          eval_export_dir: Directory to store a pickled scikit-learn model. This
              directory is created if it does not exist.
      """
      x_train = [[3, 0], [4, 1]]
      y_train = [0, 1]
      model = nn.MLPClassifier(max_iter=1)
      model.feature_keys = ["age", "language"]
      model.label_key = "label"
      model.fit(x_train, y_train)
  
      os.makedirs(eval_export_dir)
      model_path = os.path.join(eval_export_dir, "model.pkl")
      with open(model_path, "wb+") as f:
          pickle.dump(model, f)
  
file_path: tfx/tfx/examples/penguin/experimental/sklearn_predict_extractor_test.py
imports: import os
  import pickle
  import apache_beam
  from apache_beam.testing import util
  from sklearn import neural_network
  import tensorflow_model_analysis
  from tfx.examples.penguin.experimental import sklearn_predict_extractor
  from tfx_bsl.tfxio import tensor_adapter
  from tfx_bsl.tfxio import test_util
  from google.protobuf import text_format
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 6 for calling the SklearnPredictExtractorTest obj's underlying member method code with example usage: obj._create_sklearn_model(eval_export_dir) without return types