-
Notifications
You must be signed in to change notification settings - Fork 23
Description
@iancze @gully I would love some help on this.
So the Habib likelihood function is great for comparing fitting the GP hyperparameters to the spectra, but I've been wondering if we can rewrite from the perspective of tensors.
To start, instead of representing Sig_w as a block diagonal, why not just use a (m, M, M) tensor? (M is num input params, m is num eigenspectra- following nomenclature from literature/existing code)
Then, when we look at Phi, why not represent it as a tensor with shape (M, Npix, m) or something so that when matrix multiplied with a sample of w will create a tensor with shape (M, Npix) which should also be the shape of the fluxes F instead of concatenating them all together.
I fiddled around the above shapes trying to work through the appendix and match the shapes of everything but I fell short when trying to get the MLE of w- instead of getting shape (m,) I always had a rank 2 tensor.
If we can figure out a way to rework the Habib implementation from the view of tensors I think our code will be much more elegant and easy to parse, along with being more easily vectorized using PyTorch or similar.