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

Fix obs_noise confusion #400

Merged
merged 2 commits into from
Oct 13, 2023
Merged

Fix obs_noise confusion #400

merged 2 commits into from
Oct 13, 2023

Conversation

henrymoss
Copy link
Contributor

I have changed all uses of obs_noise (the noise level of our Gaussian likelihood) to obs_stddev which is much clearer.

We were previously inconsistent with this (sometimes it was var and sometimes it was sd) which actually lead to some bugs which have been fixed in this PR.

I have changed a couple of obs_noise=1e-6 to be obs_stddev=1e-3 to keep the same behaviour in our notebooks.

A = Lz_inv_Kzx / jnp.sqrt(noise)
A = Lz_inv_Kzx / jnp.sqrt(noise_var)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here do we need the jnp.sqrt? Could we just use obs_stddev?

Comment on lines 684 to 685

# A = Lz⁻¹ Kzt / o
Copy link
Member

@daniel-dodd daniel-dodd Oct 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think pre-commit stuff has gone rogue 😱. The comment should has a σ not an o. (separate issue).

Copy link
Member

@daniel-dodd daniel-dodd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @henrymoss. This looks really good to me. likelihood.obs_stddev is fine, but maybe something like e.g., likelihood.root_variance might read more cleanly. But I leave this up to you. :)

Comment on lines 136 to 135
Sigma = Sigma + cola.ops.I_like(Sigma) * (obs_noise + posterior.prior.jitter)
Sigma = Sigma + cola.ops.I_like(Sigma) * (obs_stddev + posterior.prior.jitter)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah @henrymoss this needs to be squared here.

Copy link
Collaborator

@thomaspinder thomaspinder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks @henrymoss. Just need to fix Dan's comment re. the diagonal noise component and it can be merged.

@henrymoss henrymoss merged commit 17c6825 into main Oct 13, 2023
14 checks passed
@st-- st-- deleted the fix_noise branch November 30, 2023 10:04
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.

3 participants