class_docstr: Computes Pearsons's Correlation Coefficient.
  
  Usage:
  >>> actuals = tf.constant([12, 2, 1, 12, 2], dtype=tf.int32)
  >>> preds = tf.constant([1, 4, 7, 1, 0], dtype=tf.int32)
  >>> m = tfa.metrics.PearsonsCorrelation(0, 13, 0, 8)
  >>> m.update_state(actuals, preds)
  >>> m.result().numpy()
  -0.5618297
class_docstr_tok: ["Computes","Pearsons","'s","Correlation","Coefficient",".","Usage",":",">",">",">","actuals","=","tf.constant","(","[","12",",","2",",","1",",","12",",","2","]",",","dtype=tf.int32",")",">",">",">","preds","=","tf.constant","(","[","1",",","4",",","7",",","1",",","0","]",",","dtype=tf.int32",")",">",">",">","m","=","tfa.metrics.PearsonsCorrelation","(","0",",","13",",","0",",","8",")",">",">",">","m.update_state","(","actuals",",","preds",")",">",">",">","m.result","(",")",".numpy","(",")","-0.5618297"]
code: def result(self):
      ncol = tf.cast(self.ncol, tf.float32)
      nrow = tf.cast(self.nrow, tf.float32)
      m = tf.cast(self.m, tf.float32)
      n = tf.cast(self.n, tf.float32)
  
      col_bins = (
          self.preds_cuts[1:] - self.preds_cuts[:-1]
      ) / 2.0 + self.preds_cuts[:-1]
      row_bins = (
          self.actual_cuts[1:] - self.actual_cuts[:-1]
      ) / 2.0 + self.actual_cuts[:-1]
  
      n_col = tf.reduce_sum(ncol)
      n_row = tf.reduce_sum(nrow)
      col_mean = tf.reduce_sum(ncol * col_bins) / n_col
      row_mean = tf.reduce_sum(nrow * row_bins) / n_row
  
      col_var = tf.reduce_sum(
          ncol * tf.square(col_bins)
      ) - n_col * tf.square(col_mean)
      row_var = tf.reduce_sum(
          nrow * tf.square(row_bins)
      ) - n_row * tf.square(row_mean)
  
      joint_product = m * tf.expand_dims(row_bins, axis=1) * col_bins
  
      corr = tf.reduce_sum(joint_product) - n * col_mean * row_mean
  
      return corr / tf.sqrt(col_var * row_var)
  
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 for calling the PearsonsCorrelation obj's underlying member method code with example usage: obj.result() and returns: unknown