Similarities between LR and SVM
- Both LR and SVM are classification algorithms.
- If kernel functions are not considered, LR and SVM are linear classification algorithms, that is, their classification decision planes are linear.
- LR and SVM are both supervised learning algorithms.
- Both LR and SVM are discriminative models.
Differences
- Different loss functions
- SVM only considers the points near the local boundary line, while logistic regression considers global (the confirmation of the distant point also works ).
- In solving non-linear Problems, SVM uses the kernel function mechanism, while LR usually does not use the kernel function method.When calculating the decision plane, only a few samples representing the support vector are involved in the SVM algorithm, that is, only a few samples need to be involved in the kernel calculation (that is, the coefficients of the kernal machine solution are sparse ). However, in the LR algorithm, each sample point must be involved in the calculation process of the Decision surface. That is to say, if we also use the kernel function principle in LR, then each sample point must be involved in the kernel calculation, the computing complexity is quite high. Therefore, in specific applications, LR seldom uses the kernel function mechanism.
- Linear SVM depends on the distance measurement expressed by data. Therefore, normalization is required for data, and LR is not affected.
- The loss function of SVM comes with regular expressions.
Differences between SVM and LR