class_docstr: A combiner which computes boolean flip rate metrics.
class_docstr_tok: ["A","combiner","which","computes","boolean","flip","rate","metrics","."]
code: def extract_output(
      self, accumulator: _BooleanFlipRatesAccumulator
  ) -> metric_types.MetricsDict:
      return {
          self._flip_rate_key: (
              accumulator.num_weighted_neg_to_pos
              + accumulator.num_weighted_pos_to_neg
          )
          / accumulator.num_weighted_examples,
          self._neg_to_neg_key: (
              accumulator.num_weighted_neg_to_neg
              / accumulator.num_weighted_examples
          ),
          self._neg_to_pos_key: (
              accumulator.num_weighted_neg_to_pos
              / accumulator.num_weighted_examples
          ),
          self._pos_to_neg_key: (
              accumulator.num_weighted_pos_to_neg
              / accumulator.num_weighted_examples
          ),
          self._pos_to_pos_key: (
              accumulator.num_weighted_pos_to_pos
              / accumulator.num_weighted_examples
          ),
      }
  
file_path: model-analysis/tensorflow_model_analysis/metrics/flip_metrics.py
imports: import dataclasses
  from typing import Optional, Iterable, List
  import apache_beam
  from tensorflow_model_analysis.metrics import metric_types
  from tensorflow_model_analysis.metrics import metric_util
  from tensorflow_model_analysis.proto import config_pb2
  from tensorflow_model_analysis.utils import model_util
label_desc: Use image node_id 5 for calling the _BooleanFlipRatesCombiner obj's underlying member method code with example usage: obj.extract_output(accumulator) and returns: dict