class_docstr: A combiner for utility analysis counts.
class_docstr_tok: ["A","combiner","for","utility","analysis","counts","."]
docstr: Computes the probability that the partition kept.
code: def compute_metrics(
      self, acc: PartitionSelectionAccumulator
  ) -> float:
      """Computes the probability that the partition kept."""
      probs, moments = acc
      params = self._params
      spec = self._spec
      calculator = PartitionSelectionCalculator(probs, moments)
      return calculator.compute_probability_to_keep(
          params.partition_selection_strategy,
          spec.eps,
          spec.delta,
          params.max_partitions_contributed,
          params.pre_threshold,
      )
  
imports: import abc
  import copy
  from dataclasses import dataclass
  from typing import Any, List, Optional, Tuple
  import numpy
  import math
  import pipeline_dp
  from pipeline_dp import budget_accounting
  from pipeline_dp import dp_computations
  from analysis import metrics
  from analysis import poisson_binomial
  from pipeline_dp import partition_selection
label_desc: Use image node_id 4 for calling the PartitionSelectionCombiner obj's underlying member method code with example usage: obj.compute_metrics(acc) and returns: calculator