class_docstr: Intent classifier using the Logistic Regression.
docstr: This method creates a scikit-learn compatible (X, y) training pairs.
docstr_tok: ["This","method","creates","a","scikit-learn","compatible","(","X",",","y",")","training","pairs","."]
code: def _create_training_matrix(
      self, training_data: TrainingData
  ) -> Tuple[csr_matrix, List[str]]:
      """This method creates a scikit-learn compatible (X, y) training pairs."""
      y = []
  
      examples = [
          e
          for e in training_data.intent_examples
          if (e.get("intent") and e.get("text"))
      ]
  
      for e in examples:
          y.append(e.get(INTENT))
  
      return self._create_X(examples), y
  
imports: import logging
  from typing import Any, Text, Dict, List, Type, Tuple
  import joblib
  from scipy.sparse import hstack, vstack, csr_matrix
  from sklearn.linear_model import LogisticRegression
  from rasa.engine.storage.resource import Resource
  from rasa.engine.storage.storage import ModelStorage
  from rasa.engine.recipes.default_recipe import DefaultV1Recipe
  from rasa.engine.graph import ExecutionContext, GraphComponent
  from rasa.nlu.classifiers import LABEL_RANKING_LENGTH
  from rasa.nlu.featurizers.featurizer import Featurizer
  from rasa.nlu.classifiers.classifier import IntentClassifier
  from rasa.shared.nlu.training_data.training_data import TrainingData
  from rasa.shared.nlu.training_data.message import Message
  from rasa.shared.nlu.constants import TEXT, INTENT
  from rasa.utils.tensorflow.constants import RANKING_LENGTH
label_desc: Use image node_id 6 for calling the LogisticRegressionClassifier obj's underlying member method code with example usage: obj._create_training_matrix(training_data) and returns: self,  y