Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On the Problem of Calculating the Variance of cost volume #48

Open
WesternTrail opened this issue Dec 11, 2022 · 1 comment
Open

On the Problem of Calculating the Variance of cost volume #48

WesternTrail opened this issue Dec 11, 2022 · 1 comment

Comments

@WesternTrail
Copy link

Use this to calculate the variance of cost volume in the program. If the number of views V=3, the calculation result should be as follows, right? But is this variance calculation consistent with the formula in the paper?

image

@zichen34
Copy link

zichen34 commented Dec 11, 2023

The code is correct.

According to the eq. (2) in the paper, there is:

$$ \begin{aligned} \frac{ ∑_{i=1}^N (V_i - \bar{V} )^2 }{N} &= \frac{∑_{i=1}^N (V_i^2 - 2V_i \bar{V} + \bar{V}^2 ) }{N} \\ &= \frac{∑_{i=1}^N V_i^2}{N} - \frac{∑_{i=1}^N 2V_i \bar{V} }{N} + \frac{∑_{i=1}^N \bar{V}^2 }{N} \\ & = \frac{∑_{i=1}^N V_i^2}{N} - \frac{ 2\bar{V} ∑_{i=1}^N V_i }{N} + \frac{N \bar{V}^2}{N} \\ & = \frac{∑_{i=1}^N V_i^2}{N} - 2\bar{V}^2 + \bar{V}^2 \\ & = \frac{∑_{i=1}^N V_i^2}{N} - \bar{V}^2 \end{aligned} $$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants