class_docstr: Stores the features produced by any featurizer.
class_docstr_tok: ["Stores","the","features","produced","by","any","featurizer","."]
docstr: Initializes the Features object.
  
  Args:
      features: The features.
      feature_type: Type of the feature, e.g. FEATURE_TYPE_SENTENCE.
      attribute: Message attribute, e.g. INTENT or TEXT.
      origin: Name of the component that created the features.
docstr_tok: ["Initializes","the","Features","object",".","Args",":","features",":","The","features",".","feature_type",":","Type","of","the","feature",",","e.g",".","FEATURE_TYPE_SENTENCE",".","attribute",":","Message","attribute",",","e.g",".","INTENT","or","TEXT",".","origin",":","Name","of","the","component","that","created","the","features","."]
code: def __init__(
      self,
      features: Union[np.ndarray, scipy.sparse.spmatrix],
      feature_type: Text,
      attribute: Text,
      origin: Union[Text, List[Text]],
  ) -> None:
      """Initializes the Features object.
  
      Args:
          features: The features.
          feature_type: Type of the feature, e.g. FEATURE_TYPE_SENTENCE.
          attribute: Message attribute, e.g. INTENT or TEXT.
          origin: Name of the component that created the features.
      """
      self.features = features
      self.type = feature_type
      self.origin = origin
      self.attribute = attribute
      self._cached_fingerprint: Optional[Text] = None
      if not self.is_dense() and not self.is_sparse():
          raise ValueError(
              "Features must either be a numpy array for dense "
              "features or a scipy sparse matrix for sparse features."
          )
  
imports: from __future__ import annotations
  from typing import Iterable, Union, Text, Optional, List, Any, Tuple, Dict, Set
  import itertools
  import numpy
  import scipy.sparse
  import rasa.shared.utils.io
  import rasa.shared.nlu.training_data.util
  from rasa.shared.nlu.constants import FEATURE_TYPE_SEQUENCE, FEATURE_TYPE_SENTENCE
label_desc: Use image node_id 1 to create a new Features object  with example: obj = Features(features, feature_type, attribute, origin)