Skip to content

Commit 7f594f8

Browse files
committed
Fix single update in pearson corrcoef (Lightning-AI#2019)
* fix * changelog
1 parent 309989f commit 7f594f8

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5050

5151
### Fixed
5252

53+
<<<<<<< HEAD
5354
-
5455

5556

@@ -77,6 +78,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7778
- Fixed bug in `MetricCollection` when used with multiple metrics that return dicts with same keys ([#2027](https://github.com/Lightning-AI/torchmetrics/pull/2027))
7879
- Fixed bug in detection intersection metrics when `class_metrics=True` resulting in wrong values ([#1924](https://github.com/Lightning-AI/torchmetrics/pull/1924))
7980
- Fixed missing attributes `higher_is_better`, `is_differentiable` for some metrics ([#2028](https://github.com/Lightning-AI/torchmetrics/pull/2028))
81+
||||||| parent of cbe6f3e1 (Fix single update in pearson corrcoef (#2019))
82+
- Fixed support for pixelwise MSE ([#2017](https://github.com/Lightning-AI/torchmetrics/pull/2017)
83+
=======
84+
- Fixed bug in `PearsonCorrCoef` is updated on single samples at a time ([#2019](https://github.com/Lightning-AI/torchmetrics/pull/2019)
85+
86+
87+
- Fixed support for pixelwise MSE ([#2017](https://github.com/Lightning-AI/torchmetrics/pull/2017)
88+
>>>>>>> cbe6f3e1 (Fix single update in pearson corrcoef (#2019))
8089
8190

8291
## [1.1.0] - 2023-08-22

src/torchmetrics/functional/regression/pearson.py

-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ def _pearson_corrcoef_update(
5959
n_obs = preds.shape[0] if weights is None else weights.sum()
6060
cond = n_prior.mean() > 0 or n_obs == 1
6161

62-
# Calculate means
6362
if cond:
6463
if weights is None:
6564
mx_new = (n_prior * mean_x + preds.sum(0)) / (n_prior + n_obs)

0 commit comments

Comments
 (0)