Skip to content

Commit

Permalink
Fix single update in pearson corrcoef (Lightning-AI#2019)
Browse files Browse the repository at this point in the history
* fix
* changelog
  • Loading branch information
matsumotosan authored and Borda committed Sep 19, 2023
1 parent 48fc353 commit e2e800f
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/torchmetrics/functional/regression/pearson.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ def _pearson_corrcoef_update(
n_obs = preds.shape[0] if weights is None else weights.sum()
cond = n_prior.mean() > 0 or n_obs == 1

# Calculate means
if cond:
if weights is None:
mx_new = (n_prior * mean_x + preds.sum(0)) / (n_prior + n_obs)
Expand Down

0 comments on commit e2e800f

Please sign in to comment.