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

[WIP]: Implementing Kronecker terms #6

Closed
wants to merge 30 commits into from
Closed

[WIP]: Implementing Kronecker terms #6

wants to merge 30 commits into from

Conversation

dfm
Copy link
Member

@dfm dfm commented Oct 14, 2020

closes #5

To do:

  • Implement and test LowRankKronTerm
  • Implement the addition operation for Kron terms
  • Implement conditional mean matrices. I expect that the logic will be similar to the existing get_celerite_matrices implementation but I haven't worked it through
  • Implement Theano version of these matrices
  • Add a tutorial
  • Consider interface to deal with missing data. Perhaps we just want to allow R or alpha to have an entry for each time? Or do we just want to have a mask for missing data? The former is more flexible, but the logic is a bit trickier and what would that mean for predictions? Now alpha and R would have to be functions of time? I'm open to this being punted on and moved to future work.

@tagordon: I'll add you as a collaborator on this repository shortly so that you can push to this branch.

@dfm
Copy link
Member Author

dfm commented Oct 14, 2020

OK - I added a numpy implementation of the low rank term and I think it's right...

@dfm
Copy link
Member Author

dfm commented Oct 15, 2020

I've opened #8 to track the fact that we haven't implemented missing data yet, but I want to continue with this implementation without worrying about the details of that too much so I've removed that from the checklist.

@dfm
Copy link
Member Author

dfm commented Oct 16, 2020

I took a stab at the conditional mean matrices and it wasn't obvious how to make it work so I'm also going to punt on that for now.

@dfm
Copy link
Member Author

dfm commented Oct 21, 2020

I realized that there must be some way to convert Appendix C of the Celerite2D paper into the conditional_mean matrix format here (or update the algorithm a bit) so I'm going to add that back to the checklist. I have a draft of an initial tutorial and I'm working on an RV case study for exoplanet so we're getting close!

@dfm
Copy link
Member Author

dfm commented Oct 22, 2020

@tagordon @ericagol: In writing up the docs for this, I realized something that perhaps you guys have known all along. We've been artificially restricting ourselves with these two "cases" for the covariance. If we write: R = L * L^T where L has dimensions M, K where K <= M we capture the general R version and the alpha version from our paper. The total scaling of the method will be: O(N M J^2 K^2) which also covers both cases. So, in terms of implementation, for the general case we can take the Cholesky factorization of R to get L and then we don't need all the logic that we had before to deal with the two cases. I've now implemented this on this branch and it removed quite a bit of code and it supports other models where 1 < K < M! It's also interesting to think about what kinds of models correspond to low rank systems like this.

@ericagol
Copy link

@dfm Nice; I hadn't realized this!

@tagordon
Copy link
Collaborator

@dfm I guess I hadn’t thought it through that far! That works out nicely.

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.

Port Kronecker implementation from specgp to be compatible with celerite2
3 participants