class_docstr: Represents an immutable set of features to be calculated for a single dataframe, and their
  dependencies.
class_docstr_tok: ["Represents","an","immutable","set","of","features","to","be","calculated","for","a","single","dataframe",",","and","their","dependencies","."]
docstr: Args:
      features (list[Feature]): Features of the target dataframe.
      approximate_feature_trie (Trie[RelationshipPath, set[str]], optional): Dependency
          features to ignore because they have already been approximated. For example, if
          one of the target features is a direct feature of a feature A and A is included in
          approximate_feature_trie then neither A nor its dependencies will appear in
          FeatureSet.feature_trie.
docstr_tok: ["Args",":","features","(","list","[","Feature","]",")",":","Features","of","the","target","dataframe",".","approximate_feature_trie","(","Trie","[","RelationshipPath",",","set","[","str","]","]",",","optional",")",":","Dependency","features","to","ignore","because","they","have","already","been","approximated",".","For","example",",","if","one","of","the","target","features","is","a","direct","feature","of","a","feature","A","and","A","is","included","in","approximate_feature_trie","then","neither","A","nor","its","dependencies","will","appear","in","FeatureSet.feature_trie","."]
code: def __init__(self, features, approximate_feature_trie=None):
      """
      Args:
          features (list[Feature]): Features of the target dataframe.
          approximate_feature_trie (Trie[RelationshipPath, set[str]], optional): Dependency
              features to ignore because they have already been approximated. For example, if
              one of the target features is a direct feature of a feature A and A is included in
              approximate_feature_trie then neither A nor its dependencies will appear in
              FeatureSet.feature_trie.
      """
      self.target_df_name = features[0].dataframe_name
      self.target_features = features
      self.target_feature_names = {f.unique_name() for f in features}
  
      if not approximate_feature_trie:
          approximate_feature_trie = Trie(
              default=list,
              path_constructor=RelationshipPath,
          )
      self.approximate_feature_trie = approximate_feature_trie
  
      # Maps the unique name of each feature to the actual feature. This is necessary
      # because features do not support equality and so cannot be used as
      # dictionary keys. The equality operator on features produces a new
      # feature (which will always be truthy).
      self.features_by_name = {f.unique_name(): f for f in features}
  
      feature_dependents = defaultdict(set)
      for f in features:
          deps = f.get_dependencies(deep=True)
          for dep in deps:
              feature_dependents[dep.unique_name()].add(f.unique_name())
              self.features_by_name[dep.unique_name()] = dep
              subdeps = dep.get_dependencies(deep=True)
              for sd in subdeps:
                  feature_dependents[sd.unique_name()].add(
                      dep.unique_name()
                  )
  
      # feature names (keys) and the features that rely on them (values).
      self.feature_dependents = {
          fname: [
              self.features_by_name[dname]
              for dname in feature_dependents[fname]
          ]
          for fname, f in self.features_by_name.items()
      }
  
      self._feature_trie = None
  
file_path: featuretools/featuretools/computational_backends/feature_set.py
imports: import itertools
  import logging
  from collections import defaultdict
  from featuretools.entityset.relationship import RelationshipPath
  from featuretools.feature_base import AggregationFeature, FeatureOutputSlice, GroupByTransformFeature, TransformFeature
  from featuretools.utils import Trie
label_desc: Use image node_id 1 to create a new FeatureSet object from inherited base classes: object with example: obj = FeatureSet(features, approximate_feature_trie)