class_docstr: Computes squared pearson correlation (r^2) metric.
class_docstr_tok: ["Computes","squared","pearson","correlation","(","r^2",")","metric","."]
code: def __init__(
      self,
      key: metric_types.MetricKey,
      eval_config: Optional[config_pb2.EvalConfig],
      aggregation_type: Optional[metric_types.AggregationType],
      class_weights: Optional[Dict[int, float]],
      example_weighted: bool,
  ):
      self._key = key
      self._eval_config = eval_config
      self._aggregation_type = aggregation_type
      self._class_weights = class_weights
      self._example_weighted = example_weighted
  
file_path: model-analysis/tensorflow_model_analysis/metrics/squared_pearson_correlation.py
imports: from typing import Dict, Iterable, Optional
  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
label_desc: Use image node_id 1 to create a new _SquaredPearsonCorrelationCombiner object from inherited base classes: beam with example: obj = _SquaredPearsonCorrelationCombiner(key, eval_config, aggregation_type, class_weights, example_weighted)