Epsilon-Support Vector Regression. The free parameters in the model are C and epsilon. The implementation is based on libsvm. The fit time complexity is more than quadratic with the number of samples which makes it hard to scale to datasets with more than a couple of 10000 samples.
| 1188 | |
| 1189 | |
| 1190 | class SVR(RegressorMixin, BaseLibSVM): |
| 1191 | """Epsilon-Support Vector Regression. |
| 1192 | |
| 1193 | The free parameters in the model are C and epsilon. |
| 1194 | |
| 1195 | The implementation is based on libsvm. The fit time complexity |
| 1196 | is more than quadratic with the number of samples which makes it hard |
| 1197 | to scale to datasets with more than a couple of 10000 samples. For large |
| 1198 | datasets consider using :class:`~sklearn.svm.LinearSVR` or |
| 1199 | :class:`~sklearn.linear_model.SGDRegressor` instead, possibly after a |
| 1200 | :class:`~sklearn.kernel_approximation.Nystroem` transformer or |
| 1201 | other :ref:`kernel_approximation`. |
| 1202 | |
| 1203 | Read more in the :ref:`User Guide <svm_regression>`. |
| 1204 | |
| 1205 | Parameters |
| 1206 | ---------- |
| 1207 | kernel : {'linear', 'poly', 'rbf', 'sigmoid', 'precomputed'} or callable, \ |
| 1208 | default='rbf' |
| 1209 | Specifies the kernel type to be used in the algorithm. |
| 1210 | If none is given, 'rbf' will be used. If a callable is given it is |
| 1211 | used to precompute the kernel matrix. |
| 1212 | For an intuitive visualization of different kernel types |
| 1213 | see :ref:`sphx_glr_auto_examples_svm_plot_svm_regression.py` |
| 1214 | |
| 1215 | degree : int, default=3 |
| 1216 | Degree of the polynomial kernel function ('poly'). |
| 1217 | Must be non-negative. Ignored by all other kernels. |
| 1218 | |
| 1219 | gamma : {'scale', 'auto'} or float, default='scale' |
| 1220 | Kernel coefficient for 'rbf', 'poly' and 'sigmoid'. |
| 1221 | |
| 1222 | - if ``gamma='scale'`` (default) is passed then it uses |
| 1223 | 1 / (n_features * X.var()) as value of gamma, |
| 1224 | - if 'auto', uses 1 / n_features |
| 1225 | - if float, must be non-negative. |
| 1226 | |
| 1227 | .. versionchanged:: 0.22 |
| 1228 | The default value of ``gamma`` changed from 'auto' to 'scale'. |
| 1229 | |
| 1230 | coef0 : float, default=0.0 |
| 1231 | Independent term in kernel function. |
| 1232 | It is only significant in 'poly' and 'sigmoid'. |
| 1233 | |
| 1234 | tol : float, default=1e-3 |
| 1235 | Tolerance for stopping criterion. |
| 1236 | |
| 1237 | C : float, default=1.0 |
| 1238 | Regularization parameter. The strength of the regularization is |
| 1239 | inversely proportional to C. Must be strictly positive. |
| 1240 | The penalty is a squared l2. For an intuitive visualization of the |
| 1241 | effects of scaling the regularization parameter C, see |
| 1242 | :ref:`sphx_glr_auto_examples_svm_plot_svm_scale_c.py`. |
| 1243 | |
| 1244 | epsilon : float, default=0.1 |
| 1245 | Epsilon in the epsilon-SVR model. It specifies the epsilon-tube |
| 1246 | within which no penalty is associated in the training loss function |
| 1247 | with points predicted within a distance epsilon from the actual |
no outgoing calls