如何使用 scikit-learn 进行高斯/多项式回归? [英] How to do gaussian/polynomial regression with scikit-learn?
问题描述
scikit-learn 是否提供使用高斯或多项式核执行回归的工具?我查看了 API,但没有看到任何 API.有没有人在 scikit-learn 之上构建了一个包来做到这一点?
Does scikit-learn provide facility to perform regression using a gaussian or polynomial kernel? I looked at the APIs and I don't see any. Has anyone built a package on top of scikit-learn that does this?
推荐答案
要么使用 Support Vector Regression sklearn.svm.SVR
并设置适当的 kernel
(请参阅此处).
Either you use Support Vector Regression sklearn.svm.SVR
and set the appropritate kernel
(see here).
或者您安装最新的 sklearn 主版本并使用最近添加的 sklearn.preprocessing.PolynomialFeatures
(参见 此处),然后是 OLS 或 Ridge
.
Or you install the latest master version of sklearn and use the recently added sklearn.preprocessing.PolynomialFeatures
(see here) and then OLS or Ridge
on top of that.
这篇关于如何使用 scikit-learn 进行高斯/多项式回归?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!