class_docstr: A combiner statistics generator that computes cross feature statistics.
    
class_docstr_tok: ["A","combiner","statistics","generator","that","computes","cross","feature","statistics","."]
docstr: Initializes cross feature statistics generator.
  
  Args:
    name: An optional unique name associated with the statistics generator.
    feature_crosses: List of numeric feature crosses for which to compute
      statistics. If None, we compute statistics for all numeric crosses.
    sample_rate: Sample rate.
docstr_tok: ["Initializes","cross","feature","statistics","generator",".","Args",":","name",":","An","optional","unique","name","associated","with","the","statistics","generator",".","feature_crosses",":","List","of","numeric","feature","crosses","for","which","to","compute","statistics",".","If","None",",","we","compute","statistics","for","all","numeric","crosses",".","sample_rate",":","Sample","rate","."]
code: def __init__(
      self,  # pylint: disable=useless-super-delegation
      name: Text = "CrossFeatureStatsGenerator",
      feature_crosses: Optional[List[types.FeatureCross]] = None,
      sample_rate: float = 0.1,
  ) -> None:
      """Initializes cross feature statistics generator.
  
      Args:
        name: An optional unique name associated with the statistics generator.
        feature_crosses: List of numeric feature crosses for which to compute
          statistics. If None, we compute statistics for all numeric crosses.
        sample_rate: Sample rate.
      """
      super(CrossFeatureStatsGenerator, self).__init__(name, None)
      self._feature_crosses = feature_crosses
      self._features_needed = None
      if self._feature_crosses:
          self._features_needed = set()
          for feat_x, feat_y in self._feature_crosses:
              self._features_needed.add(feat_x)
              self._features_needed.add(feat_y)
      self._sample_rate = sample_rate
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import itertools
  import math
  import random
  from typing import Dict, Iterable, List, Optional, Text
  import numpy
  import pandas
  from pandas import DataFrame, Series
  import pyarrow
  from tensorflow_data_validation import types
  from tensorflow_data_validation.statistics.generators import stats_generator
  from tensorflow_data_validation.utils import stats_util
  from tfx_bsl.arrow import array_util
  from tensorflow_metadata.proto.v0 import path_pb2
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 1 to create a new CrossFeatureStatsGenerator object from inherited base classes: stats_generator with example: obj = CrossFeatureStatsGenerator(name, feature_crosses, sample_rate)