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

GP overfitting data #183

Closed
avivajpeyi opened this issue Feb 15, 2022 · 3 comments · Fixed by #186
Closed

GP overfitting data #183

avivajpeyi opened this issue Feb 15, 2022 · 3 comments · Fixed by #186

Comments

@avivajpeyi
Copy link
Collaborator

Overfit GP EGs

TOI 103:

iTerm2 Tb6Ky4 diagnostic_flux_vs_time
iTerm2 2pGTTz diagnostic_trace_plot
iTerm2 1Y52Xi phase_plot_1
iTerm2 CZPUaC data_ci_phase_plot_1
iTerm2 ByzqO0 folded_flux_vs_time

Notebook:
toi_103.ipynb.zip

TOI 1006

iTerm2 eHPXR6 diagnostic_flux_vs_time

iTerm2 QCdxkZ diagnostic_trace_plot

iTerm2 dgZzMU planet_0_posteriors

Some others

iTerm2 9didNA diagnostic_flux_vs_time
iTerm2 mJT4ef diagnostic_flux_vs_time
iTerm2 otreUm diagnostic_flux_vs_time

iTerm2 PM89bc diagnostic_flux_vs_time
iTerm2 NuWdUv diagnostic_flux_vs_time

Note: appears to be performing ok(?) in some cases

iTerm2 Y4do0m diagnostic_flux_vs_time

iTerm2 AlN7xg diagnostic_flux_vs_time

@avivajpeyi
Copy link
Collaborator Author

TOI 178:

diagnostic_flux_vs_time

phase_plot_2
phase_plot_3
phase_plot_4

phase_plot_1
diagnostic_trace_plot

@avivajpeyi
Copy link
Collaborator Author

There was a mistake in the model 😑... a very silly mistake:

The original code

residual = y - lightcurve
gp = GaussianProcess(
    kernel, t=t, diag=yerr ** 2 + jitter_prior ** 2, mean=lightcurve
)
gp.marginal(name="obs", observed=y)

This makes the GP fit the raw relative flux data, and makes the GP mean->lc
Screen Shot 2022-02-18 at 5 51 45 pm
Here we see that the GP is fitting the transit, and the transit model does not fit all the transit data.

Modified model

residual = y - lightcurve
gp = GaussianProcess(
    kernel, t=t, diag=yerr ** 2 + jitter_prior ** 2.0
)
gp.marginal(name="obs", observed=residual)

Making the GP fit the residual and removing the mean-->lc, we get the following:
Screen Shot 2022-02-18 at 5 51 32 pm
This seems better -- Ill merge it in but should check in with Dan to see if it is correct.

@dfm
Copy link
Owner

dfm commented Feb 18, 2022

That looks perfect! Good find.

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 a pull request may close this issue.

2 participants