LLNL / MuyGPyS

A fast, pure python implementation of the MuyGPs Gaussian process realization and training algorithm.
Other
25 stars 11 forks source link

Docstring example in MuyGPS object leads to error #187

Closed petershagnea closed 10 months ago

petershagnea commented 1 year ago

Running the example code in the MuyGPS docstring:

`from MuyGPyS.gp import MuyGPS

k_kwargs = { "kern": "rbf", "metric": "F2", "eps": {"val": 1e-5}, "nu": {"val": 0.38, "bounds": (0.1, 2.5)}, "length_scale": {"val": 7.2}, } muygps = MuyGPS(**k_kwargs)`

Results in the following error: `TypeError Traceback (most recent call last) Cell In[12], line 9 1 from MuyGPyS.gp import MuyGPS 2 k_kwargs = { 3 "kern": "rbf", 4 "metric": "F2", (...) 7 "length_scale": {"val": 7.2}, 8 } ----> 9 muygps = MuyGPS(**k_kwargs)

TypeError: init() got an unexpected keyword argument 'kern'`

The same error occurs when running "do_regress". Constructing the MuyGPS object as explained in the univariate regression tutorial works properly. Are these docstrings up to date?

bwpriest commented 1 year ago

Thanks for the catch, @petershagnea. The docstrings in MuyGPyS.examples are not up-to-date, and in fact that whole module is due for renovation, see issue #108. I'll try to get to get to that soon.

bwpriest commented 1 year ago

I believe that PR #193 address this, so it is fixed in develop. The next release will involve a lot of small changes to the API, so I will try to keep the docstrings up-to-date.