class_docstr: Computes the standard deviation for each metric from samples.
class_docstr_tok: ["Computes","the","standard","deviation","for","each","metric","from","samples","."]
docstr: Initializes a SampleCombineFn.
  
  Args:
    num_samples: The number of samples computed per slice.
    full_sample_id: The sample_id corresponding to the unsampled metrics.
    skip_ci_metric_keys: Set of metric keys for which to skip confidence
      interval computation. For metric keys in this set, just the unsampled
      value will be returned.
docstr_tok: ["Initializes","a","SampleCombineFn",".","Args",":","num_samples",":","The","number","of","samples","computed","per","slice",".","full_sample_id",":","The","sample_id","corresponding","to","the","unsampled","metrics",".","skip_ci_metric_keys",":","Set","of","metric","keys","for","which","to","skip","confidence","interval","computation",".","For","metric","keys","in","this","set",",","just","the","unsampled","value","will","be","returned","."]
code: def __init__(
      self,
      num_samples: int,
      full_sample_id: int,
      skip_ci_metric_keys: Optional[Set[metric_types.MetricKey]] = None,
  ):
      """Initializes a SampleCombineFn.
  
      Args:
        num_samples: The number of samples computed per slice.
        full_sample_id: The sample_id corresponding to the unsampled metrics.
        skip_ci_metric_keys: Set of metric keys for which to skip confidence
          interval computation. For metric keys in this set, just the unsampled
          value will be returned.
      """
      self._num_samples = num_samples
      self._full_sample_id = full_sample_id
      self._skip_ci_metric_keys = skip_ci_metric_keys
      self._num_slices_counter = beam.metrics.Metrics.counter(
          constants.METRICS_NAMESPACE, "num_slices"
      )
      self._missing_samples_counter = beam.metrics.Metrics.counter(
          constants.METRICS_NAMESPACE, "num_slices_missing_samples"
      )
      self._missing_metric_samples_counter = (
          beam.metrics.Metrics.counter(
              constants.METRICS_NAMESPACE,
              "num_slices_missing_metric_samples",
          )
      )
  
file_path: model-analysis/tensorflow_model_analysis/evaluators/confidence_intervals_util.py
imports: import collections
  import numbers
  from typing import Iterable, NamedTuple, Optional, Sequence, Set, Tuple
  import apache_beam
  import numpy
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.metrics import metric_types
  from tensorflow_model_analysis.post_export_metrics import metric_keys
label_desc: Use image node_id 1 to create a new SampleCombineFn object from inherited base classes: beam with example: obj = SampleCombineFn(num_samples, full_sample_id, skip_ci_metric_keys)