SVM Regressor
SVM Regressor
Unit 4
Debangshu Chatterjee
1
Support Vector Machine (SVM)
2
Support Vector Machine (SVM)
3
Hyperparameters of the Support Vector Machine
5
Hyperparameters of the Support Vector Machine
9
Disadvantages of Support Vector Regression
10
R-squared score
• R-squared, also known as the coefficient of determination, is a statistical measure that represents the proportion
of the variance in the dependent variable that is explained by the independent variable(s). It is commonly used to
evaluate the goodness of fit of a linear regression model.
• The R-squared score ranges from 0 to 1, with 1 indicating a perfect fit of the model to the data and 0 indicating no
fit. A negative R-squared score can indicate that the model is worse than predicting the mean of the dependent
variable.
• The R-squared score is calculated as the ratio of the explained variance to the total variance. It is calculated as:
• where SS_res is the sum of squared residuals (the difference between the actual and predicted values) and
• SS_tot is the total sum of squares (the difference between the actual values and the mean of the dependent
variable).
• A higher R-squared score indicates a better fit of the model to the data, but it is important to note that a high R-
squared score does not necessarily mean that the model is the best possible model for the data, and it should be
used in conjunction with other metrics and validation techniques.
11
Mean squared error
• Mean squared error (MSE) is a statistical metric used to measure the average squared difference between the
predicted and actual values of a regression model. It is commonly used to evaluate the accuracy of a regression
model.
• MSE is calculated by taking the average of the squared differences between the predicted and actual values:
• where yi is the actual value, ŷi is the predicted value, n is the number of samples.
• MSE is always non-negative, with values closer to zero indicating better model performance. A perfect prediction
would result in an MSE of zero.
• However, MSE is sensitive to outliers, and it is not always easy to interpret the value because it depends on the
scale of the data. Therefore, it is often used in conjunction with other evaluation metrics to get a more complete
picture of the model's performance.
12
13