Comments (3)
Hi! thanks for your contribution!, great first issue!
from torchmetrics.
Hi @vadim0x60, thanks for opening this issue.
The two formulations are equal:
substitute the definition of
into the expression we get
then expand the square term
Next, distributing the summation across the terms:
And finally, simplifying the expression:
the last term we can rewrite again by using the definition of the average (in reverse order)
expand again
split
simplify
again use the definition of the average to convert into the expression we want
Hopefully this convince you that the two expressions are equal. The reason for why we use one over the other is kind of lost on me right now, but if I remember correctly one expression is a bit more numerical stable than the other, which is why we have chosen it.
from torchmetrics.
Thanks for taking the time to lay this out!
from torchmetrics.
Related Issues (20)
- `BinaryPrecisionRecallCurve` computes wrong value if used with logits, even though the docstring says this is supported HOT 1
- Broken source links in documentation of `1.3.0.post0` HOT 2
- RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu) HOT 2
- High memory usage of Perplexity metric HOT 2
- `MultitaskWrapper` still cannot be logged HOT 1
- usage consistency on GPU between `MetricCollection` and `FeatureShare` HOT 1
- MeanAveragePrecision doesn't work as expected when using `max_detection_thresholds != [1, 10, 100]` HOT 3
- Custom callable is ignored in retrieval metric aggregation HOT 1
- Explicitly initializing tensors in `float32` in MeanMetric goes against `torch.set_default_dtype`, leading to numerical errors HOT 6
- Add an option to switch distributions order in the KLDivergence. HOT 2
- MetricWrapper for Target Binarization HOT 3
- Add Support for SQ and RQ in Panoptic Quality HOT 5
- MPS uninitialized memory(?) causing errors in `StatScores` (which cascade to other locations) HOT 1
- Importing torchmetrics causes segmentation fault with other dependencies HOT 2
- `MetricCollection` did not copy inner state of metric in `ClasswiseWrapper` when computing groups metrics HOT 1
- Wrong aggregation of Precision\Recall\F1-Score HOT 2
- Typing error for detection metrics in MultitaskWrapper HOT 2
- Can't access metrics in a MetricCollection via keys returned in MetricCollection.keys
- `log_dict` method breaks on `MultitaskWrapper` + `MetricCollection` combination HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from torchmetrics.