Support Vector Regression

Machine Learning
Introduced by
Smola, A.J. & Schölkopf, B.
Year
2004
Type
Kernel-based supervised model (epsilon-insensitive regression)

What does it do?

Support Vector Regression (SVR), reviewed in Smola and Schölkopf's 2004 tutorial, predicts a continuous outcome by fitting a function that keeps most training points within an epsilon-wide tube while keeping the function as flat as possible.

Unlike ordinary least squares, it ignores deviations smaller than epsilon and penalises only the points that fall outside the tube. A kernel allows the fitted function to capture nonlinear relationships.

The intuition behind the method

Instead of penalising every deviation from the fitted line, SVR ignores errors smaller than a tolerance epsilon — it draws a tube of width epsilon around the predicted function and only points falling outside the tube count against it. The model then seeks the flattest possible function that keeps most points inside the tube. The handful of points on or outside the tube edges become the support vectors that define the prediction.

History

Support Vector Regression extends the support vector machine approach to regression tasks. Smola and Schölkopf's 2004 tutorial in Statistics and Computing is a widely cited review that explains the epsilon-insensitive formulation and its kernelised solution.

When to use it

Choose SVR when the outcome is continuous, the relationship with the features may be nonlinear, and you have enough observations to tune the kernel and C by cross-validation. How many observations are enough depends on the number of features, the noise level and the kernel complexity; as a rough heuristic, a few dozen observations is very little for tuning. Let cross-validated performance decide whether SVR is justified. Standardise the features first. Kernel SVR training cost grows quickly with the number of observations (roughly quadratic or worse) and the kernel matrix must fit in memory, so for large datasets consider a linear kernel, an approximation, or another model. Prefer ridge or linear regression when the relationship is close to linear, when the sample is too small to support tuning, or when you need interpretable coefficients.

Limitations and considerations

  • Points outside the tube are penalised linearly through their slack variables, not quadratically, but they are still fitted, so large outliers can still shift the function.
  • With few observations the fit rests on few support vectors and hyperparameter tuning is unreliable; no fixed sample size guarantees adequacy.
  • Results depend on C, epsilon and the kernel settings, which must be tuned, usually by cross-validation.
  • With nonlinear kernels such as RBF, the kernel expansion does not yield per-feature coefficients, so the effect of each predictor cannot be read directly. With a linear kernel, the weight vector w can be computed from the support vectors and read as coefficients.
  • Training time and memory grow quickly with the number of observations, which can make kernel SVR impractical on large datasets.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • The epsilon-insensitive loss ignores deviations smaller than epsilon, so small fluctuations in the outcome do not pull the fitted function.
  • A kernel lets the model represent nonlinear relationships without manually constructing polynomial or interaction terms.
  • The fit is driven by the tube-based loss rather than by a likelihood, so it makes no normality assumption about the residuals.
  • Predictions depend only on the support vectors, which keeps the fitted model compact.

Applications

  • Nonlinear regression problems in which a kernel is expected to capture curvature that a linear model misses.
  • Prediction tasks where small measurement noise in the outcome should not drive the fit, because deviations within epsilon are ignored.
  • Compact predictive models in which only a subset of training points, the support vectors, defines the prediction.
  • Benchmarking against linear or ridge regression to test whether nonlinearity improves prediction.
  • Forecasting applications such as wind power and speed prediction, where SVR is used alongside neural networks.

How it works

How it works

1

SVR defines a tolerance band of half-width epsilon around the regression function, and a training point whose residual lies inside the band contributes no error. This makes the fit insensitive to small deviations and concentrates it on points outside the band. Because epsilon is expressed in the units of the outcome, its meaning changes if the target is rescaled.

Formula
|y_i - f(x_i)| \le \varepsilon
2

The objective trades off the flatness of the function, measured by the squared norm of w, against the slack variables (the xi terms) that measure how far points lie outside the tube. The constraints y_i - f(x_i) <= epsilon + xi_i, f(x_i) - y_i <= epsilon + xi_i* and xi_i, xi_i* >= 0 define the tube and the slacks. The parameter C sets how heavily out-of-tube deviations are penalised: a larger C tolerates less deviation. The kernel, such as the RBF kernel, defines the feature space in which this flat function is sought and therefore how nonlinear the fit can be. Because kernel values depend on distances between feature vectors, the features should be standardised before fitting, using training-set statistics only. The target is not normally standardised, so epsilon and C are interpreted in its original units unless you rescale it deliberately. C and the kernel settings are typically chosen by cross-validation.

Formula
\min_{w,b,\xi,\xi^*} \tfrac{1}{2}\lVert w\rVert^2 + C\sum_i (\xi_i + \xi_i^*) \quad \text{s.t. } y_i - f(x_i) \le \varepsilon + \xi_i,\; f(x_i) - y_i \le \varepsilon + \xi_i^*,\; \xi_i,\xi_i^* \ge 0
3

The prediction for a new input is a kernel-weighted sum over the training points, with weights alpha_i minus alpha_i*, plus an offset b. Only training points on or beyond the tube edges receive non-zero weights, so these support vectors alone determine the prediction.

Formula
f(x) = \sum_i (\alpha_i - \alpha_i^*) k(x_i, x) + b

Common pitfalls

  • Fitting SVR on unstandardised features, which lets variables with large ranges dominate the kernel distances.
  • Choosing epsilon without regard to the outcome's units; because epsilon is measured in the units of the target, rescaling the outcome changes the tube width and the fit.
  • Leaving C and the kernel parameters at default values instead of tuning them by cross-validation.
  • Reading a nonlinear-kernel fit as if it produced interpretable effect sizes.
  • Computing standardisation statistics on the full dataset instead of the training data only, which leaks information into the evaluation.
  • Judging the model by training error rather than by held-out or cross-validated error.

Frequently asked questions

What does the epsilon parameter control?

Epsilon sets the half-width of the tolerance tube around the fitted function. Deviations smaller than epsilon are treated as zero error, so a larger epsilon yields a flatter, simpler model with fewer support vectors, while a smaller epsilon fits the data more tightly.

Why must I normalise the features?

SVR relies on distances computed through the kernel. If features are on very different scales, those with larger ranges dominate the distances, so the features should be standardised before fitting, using training-set statistics only.

How small a sample is too small?

There is no fixed threshold; it depends on the number of features, the noise and the kernel. With very few observations, the fit depends on few support vectors and there is little data to tune the kernel and C, so ridge or linear regression is usually the safer choice. Compare cross-validated error against such a baseline.

How does SVR differ from ordinary least squares?

Least squares penalises every residual quadratically, whereas SVR ignores residuals inside the epsilon-tube and penalises only those outside it. Combined with a kernel, this lets SVR capture nonlinear relationships and stay less sensitive to small deviations.

How do I judge whether the fitted model is good?

Assess error on held-out data or by cross-validation, using RMSE or MAE, and compare it with a linear or ridge baseline. The fraction of training points that are support vectors shows how many lie on or outside the tube; a very high fraction suggests epsilon is small relative to the noise.

Related methods

Sources

  1. Smola, A.J. & Schölkopf, B. (2004). A Tutorial on Support Vector Regression. Statistics and Computing, 14, 199–222.

    Open DOI reference