obscode / snpy

SuperNovae in object-oriented Python (SNooPy)
Other
10 stars 16 forks source link

Gaussian Process: outdated calls to PyMC class constructors pymc.gp.Mean and pymc.gp.Covariance #7

Open shuningele opened 1 year ago

shuningele commented 1 year ago

I'm a final year physics undergrad modelling photometric data on sn2022vqz. When attempting to fit or call the template class with method="gp", I get error messages saying that Mean(const) is not a valid attribute of gp object. Browsing the pymc codes on GitHub, there seems to be Mean and Covariance objects, although the keyword arguments the Covariance constructor may take do not match those input in the fit1dcurve.py of SnooPy. Not finding what the first gp.matern.euclidean in PyMC past documentations on their website, I couldn't replace it on my local machine.

obscode commented 1 year ago

The GP fitting using pymc was for python 2.x (old pymc 2), so does not work with pymc3. Instead, install scikit-learn; SNooPy will use that instead and should work. I left the old pymc code in for python 2.x back-compatibility, but I guess at this point it's safe to abandon.