class_docstr: Intent classifier using the Logistic Regression.
docstr: Return the most likely intent and its probability for a message.
docstr_tok: ["Return","the","most","likely","intent","and","its","probability","for","a","message","."]
code: def process(self, messages: List[Message]) -> List[Message]:
      """Return the most likely intent and its probability for a message."""
      X = self._create_X(messages)
      probas = self.clf.predict_proba(X)
      for idx, message in enumerate(messages):
          intents = self.clf.classes_
          intent_ranking = [
              {"name": k, "confidence": v}
              for k, v in zip(intents, probas[idx])
          ]
          sorted_ranking = sorted(
              intent_ranking, key=lambda e: -e["confidence"]
          )
          intent = sorted_ranking[0]
          if self.config[RANKING_LENGTH] > 0:
              sorted_ranking = sorted_ranking[
                  : self.config[RANKING_LENGTH]
              ]
          message.set("intent", intent, add_to_output=True)
          message.set(
              "intent_ranking", sorted_ranking, add_to_output=True
          )
      return messages
  
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 9 for calling the LogisticRegressionClassifier obj's underlying member method code with example usage: obj.process(messages) and returns: messages