Support Vector Regression (SVR) is based on the same principles as Support Vector Machines (SVM) for classification. In SVM, we try to find a hyperplane that separates the data points into different classes with the maximum margin. SVR, on the other hand, aims to find a hyperplane that best fits the data points in a regression task.
The key idea behind SVR is to find a hyperplane in the feature space that is close to the data points but still maintains a margin of tolerance ε. The hyperplane is defined by the equation f(x) = w^T * x + b, where w is the weight vector, x is the input feature vector, and b is the bias term.
In SVR, we want to minimize the deviations of the predicted output f(x) from the true output y, while still keeping them within the margin of tolerance ε. This is achieved by finding the optimal weight vector w and bias term b that minimize the objective function:
(1/2) * ||w||^2 + C * Σ(max(0, |y_i - f(x_i)| - ε))
where ||w||^2 represents the norm of the weight vector w, C is a hyperparameter that controls the trade-off between model complexity and errors, and the summation term penalizes the deviations of the predicted outputs from the true outputs.
The constraint |y_i - f(x_i)| <= ε ensures that the predicted output lies within the margin of tolerance ε for all data points. Data points falling outside this margin contribute to the loss function and are known as "support vectors."
To solve the optimization problem, SVR uses the Lagrange duality method to transform the problem into its dual form, which allows for efficient optimization using a quadratic programming algorithm.
Once the optimal weight vector w and bias term b are determined, we can use the function f(x) to make predictions for new input data.
Overall, SVR is a powerful regression algorithm that can handle non-linear relationships between input features and output. By finding the hyperplane that best fits the data points while maintaining a margin of tolerance, SVR provides accurate predictions for regression tasks and is robust to outliers.