class_docstr: Intent classifier using the Logistic Regression.
docstr: This method creates a sparse X array that can be used for predicting.
docstr_tok: ["This","method","creates","a","sparse","X","array","that","can","be","used","for","predicting","."]
code: def _create_X(self, messages: List[Message]) -> csr_matrix:
      """This method creates a sparse X array that can be used for predicting."""
      X = []
      for e in messages:
          # First element is sequence features, second is sentence features
          sparse_feats = e.get_sparse_features(attribute=TEXT)[1]
          # First element is sequence features, second is sentence features
          dense_feats = e.get_dense_features(attribute=TEXT)[1]
          together = hstack(
              [
                  csr_matrix(
                      sparse_feats.features if sparse_feats else []
                  ),
                  csr_matrix(
                      dense_feats.features if dense_feats else []
                  ),
              ]
          )
          X.append(together)
      return vstack(X)
  
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 5 for calling the LogisticRegressionClassifier obj's underlying member method code with example usage: obj._create_X(messages) and returns: vstack