在sklearn中导入错误linearSVR

import error linearSVR in sklearn

我无法在 sklearn 中导入 LinearSVR。我做了以下

from sklearn.svm import LinearSVR

我可以轻松地将 SVR 导入为

from sklearn.svm import SVR

我的 sklearn 版本是 0.15.2

LinearSVR 从 0.16 开始就是 scikit 的一部分,正如 changelog 注释:

Added svm.LinearSVR. This class uses the liblinear implementation of Support Vector Regression which is much faster for large sample sizes than svm.SVR with linear kernel. By Fabian Pedregosa and Qiang Luo.

只有 sklearn.svm.SVR 在 0.15 中可用。该文档提供了对所有 类 in sklearn.svm in 0.15 here.

的概述