class_docstr: Base class for streaming correlation metrics.
  
  Based on https://arxiv.org/abs/1712.01521.
  
  It stores and updates the joint and marginal histograms of (`y_true`, `y_pred`).
  
  The concrete classes estimate the different correlation metrics
  based on those histograms.
class_docstr_tok: ["Base","class","for","streaming","correlation","metrics",".","Based","on","https",":","\/\/arxiv.org\/abs\/1712.01521",".","It","stores","and","updates","the","joint","and","marginal","histograms","of","(","`","y_true","`",",","`","y_pred","`",")",".","The","concrete","classes","estimate","the","different","correlation","metrics","based","on","those","histograms","."]
docstr: Creates a `CorrelationBase` instance.
  
  Args:
    actual_min: the inclusive lower bound on values from actual.
    actual_max: the exclusive upper bound on values from actual.
    preds_min: the inclusive lower bound on values from preds.
    preds_max: the exclusive upper bound on values from preds.
    actual_cutpoints: the number of divisions to create in actual range,
      defaults to 100.
    preds_cutpoints: the number of divisions to create in preds range,
      defaults to 100.
    name: (optional) String name of the metric instance
    dtype: (optional) Data type of the metric result. Defaults to `None`
docstr_tok: ["Creates","a","`","CorrelationBase","`","instance",".","Args",":","actual_min",":","the","inclusive","lower","bound","on","values","from","actual",".","actual_max",":","the","exclusive","upper","bound","on","values","from","actual",".","preds_min",":","the","inclusive","lower","bound","on","values","from","preds",".","preds_max",":","the","exclusive","upper","bound","on","values","from","preds",".","actual_cutpoints",":","the","number","of","divisions","to","create","in","actual","range",",","defaults","to","100.","preds_cutpoints",":","the","number","of","divisions","to","create","in","preds","range",",","defaults","to","100.","name",":","(","optional",")","String","name","of","the","metric","instance","dtype",":","(","optional",")","Data","type","of","the","metric","result",".","Defaults","to","`","None","`"]
code: def __init__(
      self,
      actual_min: float = 0.0,
      actual_max: float = 1.0,
      preds_min: float = 0.0,
      preds_max: float = 1.0,
      actual_cutpoints: int = 100,
      preds_cutpoints: int = 100,
      name: str = None,
      dtype: AcceptableDTypes = None,
  ):
      """Creates a `CorrelationBase` instance.
  
      Args:
        actual_min: the inclusive lower bound on values from actual.
        actual_max: the exclusive upper bound on values from actual.
        preds_min: the inclusive lower bound on values from preds.
        preds_max: the exclusive upper bound on values from preds.
        actual_cutpoints: the number of divisions to create in actual range,
          defaults to 100.
        preds_cutpoints: the number of divisions to create in preds range,
          defaults to 100.
        name: (optional) String name of the metric instance
        dtype: (optional) Data type of the metric result. Defaults to `None`
      """
      super().__init__(name=name, dtype=dtype)
      self.actual_min = actual_min
      self.actual_max = actual_max
      self.preds_min = preds_min
      self.preds_max = preds_max
      self.actual_cutpoints = actual_cutpoints
      self.preds_cutpoints = preds_cutpoints
      actual_cuts = np.linspace(
          tf.cast(self.actual_min, tf.float32),
          tf.cast(self.actual_max, tf.float32),
          self.actual_cutpoints,
      )
      actual_cuts[-1] += backend.epsilon()
      preds_cuts = np.linspace(
          tf.cast(self.preds_min, tf.float32),
          tf.cast(self.preds_max, tf.float32),
          self.preds_cutpoints,
      )
      preds_cuts[-1] += backend.epsilon()
      self.actual_cuts = tf.convert_to_tensor(actual_cuts, tf.float32)
      self.preds_cuts = tf.convert_to_tensor(preds_cuts, tf.float32)
      self.m = self.add_weight(
          "m",
          (self.actual_cutpoints - 1, self.preds_cutpoints - 1),
          dtype=tf.int64,
      )
      self.nrow = self.add_weight(
          "nrow", (self.actual_cutpoints - 1), dtype=tf.int64
      )
      self.ncol = self.add_weight(
          "ncol", (self.preds_cutpoints - 1), dtype=tf.int64
      )
      self.n = self.add_weight("n", (), dtype=tf.int64)
  
imports: from abc import abstractmethod
  import numpy
  import tensorflow
  from tensorflow.keras import backend
  from tensorflow.keras.metrics import Metric
  from tensorflow_addons.utils.types import AcceptableDTypes
  from typeguard import typechecked
label_desc: Use image node_id 1 to create a new CorrelationBase object from inherited base classes: Metric with example: obj = CorrelationBase(actual_min, actual_max, preds_min, preds_max, actual_cutpoints, preds_cutpoints, name, dtype)