Skip to content

Fix gradient computation function#105

Merged
francois-drielsma merged 3 commits intoDeepLearnPhysics:developfrom
francois-drielsma:develop
Jul 22, 2025
Merged

Fix gradient computation function#105
francois-drielsma merged 3 commits intoDeepLearnPhysics:developfrom
francois-drielsma:develop

Conversation

@francois-drielsma
Copy link
Member

No description provided.

bear-is-asleep and others added 3 commits June 26, 2025 18:51
std(x) has a prefactor of 1/N, whereas cov(x,y) has a prefactor of 1/N-1. So we should use the covariance[0,0] to get the variance of x directly.

```
cov[0,1]/cov[0,0],cov[0,1]/np.std(df['seg_rrs'][ind])**2
>>> (np.float64(0.018677554097208945), np.float64(0.020375516343523768))
```
Fixes bug for computing gradient
@francois-drielsma francois-drielsma merged commit 7c769d2 into DeepLearnPhysics:develop Jul 22, 2025
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

Successfully merging this pull request may close these issues.

2 participants