scikit-learn / scikit-learn/scikit-learn
support GPML minimize for sklearn.gaussian_process.GaussianProcessRegressor
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 67.3k
- Forks
- 27.4k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 58
Description
Describe the workflow you want to enable
I'd like to add support for another internal optimizer for sklearn.gaussian_process.GaussianProcessRegressor. Currently, the only internal optimizer that is supported is "fmin_l_bfgs_b". I'm requesting support for Carl Rasmussen minimize from GPML.
Describe your proposed solution
I don't think that the actual minimize function would be implemented in sklearn, but in scipy (please correct me if I'm wrong). So I can open up an issue on the scipy repository if this would be desirable in sklearn. This shouldn't break any existing code in sklearn as well since we can keep the "fmin_l_bfgs_b" default optimizer, but simply add support for a new one.
Describe alternatives you've considered, if relevant
I have found some python implementations of Carl Rasmussen's minimize online, although the function signature doesn't match exactly. I've yet to play around with it enough to get it to work, but that could be an alternative.
Additional context
A couple reasons I'm requesting this:
-
I believe since sklearn.gaussian_process.GaussianProcessRegressor's implementation is from the GPML book, it makes sense to support the same minimize function that is used. It seems like most of the Gaussian Process module is implemented from GPML.
-
I've personally had some issues trying to port some MATLAB code using GPML to sklearn and it seems like it is an issue with the optimization step. I can use the optimized hyperparameters as fixed inputs in sklearn and achieve similar results without running any optimization. When running optimization, it seems like it produces worse fits (in my case)
Extras
- GPML doc
- python impl of GPML minimize (BSD-2 license)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at sklearn.gaussian_process.GaussianProcessRegressor and inspect how its current fmin_l_bfgs_b optimizer is exposed. Compare the GPML minimize documentation with the linked pyGPs implementation and determine whether the optimizer belongs in scipy or scikit-learn; done means supporting the requested optimizer without changing the existing default behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100