I've followed the Machine Learning course of Andrew Ng, and I really confuse in Support Vector Machine lecture. Regarding cost function in SVM, he said that when C is very large, the loss (error) equal to 0. Can you guys help me to explain why is that?
1 Answer
If $C$ is very large, in order to reduce the cost, the term that is multiplied with $C$ should be very small, e.g. in the extreme case, if $C$ is infinite, then the other term should be $0$, otherwise the cost will be infinity.
Consider the following simple cost function:
$$J(\theta)=C\theta+f(\theta)$$
If $C$ is very very large, the optimization algorithm doesn't care about the second term much and tries to minimize the first one, e.g. $\theta$ will be close o $0$.
-
$\begingroup$ So, does it also mean if C increase, it'll lead to cost increase and underfitting, and if C decrease, then cost'll decrease and overfitting? $\endgroup$– Thuan DoMay 27, 2020 at 19:10
-
-