We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
SpearmansRank
1 parent d4a915d commit 66a81f9Copy full SHA for 66a81f9
tensorflow_addons/metrics/streaming_correlations.py
@@ -278,9 +278,9 @@ def result(self):
278
n = tf.cast(self.n, tf.float32)
279
280
nrow_ = tf.where(nrow > 0, nrow, -1.0)
281
- rrow = tf.pad(tf.cumsum(nrow)[:-1], [[1, 0]]) + (nrow_ - n) / 2
+ rrow = tf.cumsum(nrow, exclusive=True) + (nrow_ - n) / 2
282
ncol_ = tf.where(ncol > 0, ncol, -1.0)
283
- rcol = tf.pad(tf.cumsum(ncol)[:-1], [[1, 0]]) + (ncol_ - n) / 2
+ rcol = tf.cumsum(ncol, exclusive=True) + (ncol_ - n) / 2
284
285
rrow = rrow / tf.math.sqrt(tf.reduce_sum(nrow * tf.square(rrow)))
286
rcol = rcol / tf.math.sqrt(tf.reduce_sum(ncol * tf.square(rcol)))
0 commit comments