Implement scikit-learn compatibility
See original GitHub issueIt would be nice to be able to easily get posterior predictive distributions for arbitrary predictor values. The most obvious way to implement this would be to add a .predict() method to either the Model or ModelResults class. This would also bring the interface one little step closer to being scikit-learn-compatible, which is a separate goal that I think it would be nice to eventually achieve.
Issue Analytics
- State:
- Created 6 years ago
- Comments:15 (5 by maintainers)
Top Results From Across the Web
Scikit-learn compatibility — pyts 0.12.0 documentation
Scikit -learn provides a lot of utilities such as model selection and pipelines. These tools are often used in machine learning. By having...
Read more >Developing scikit-learn estimators
The main motivation to make a class compatible to the scikit-learn estimator interface might be that you want to use it together with...
Read more >Installing scikit-learn
Scikit -learn 0.20 was the last version to support Python 2.7 and Python 3.4. Scikit-learn 0.21 supported Python 3.5-3.7. Scikit-learn 0.22 supported Python...
Read more >Related Projects — scikit-learn 1.2.0 documentation
Compatible with deep learning frameworks and scikit-learn API, it can stream minibatches, use data checkpoints, build funky pipelines, and serialize models ...
Read more >Frequently Asked Questions — scikit-learn 1.2.0 documentation
You can implement your favorite algorithm in a scikit-learn compatible way, upload it to GitHub and let us know. We will be happy...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

The recently revamped
GaussianProcessRegressionmodule insklearncould be helpful inspiration. In addition to.predict, this class has a.sample_ymethod, which takesn_samplesandrandom_stateare arguments. https://github.com/scikit-learn/scikit-learn/blob/01e0639b15d515b446cb4589f01097b16fb4994a/sklearn/gaussian_process/gpr.py#L349So fun to get to see your careful thinking about implementation!
Just realized that having
predict()wrapsample_ppcis exactly what you said you weren’t sure about :p