Regularized Logistic Regression

Regularized Logistic Regression

\(J(\theta) = - \frac{1}{m} \sum_{i=1}^m \large[ y^{(i)}\ \log (h_\theta (x^{(i)})) + (1 - y^{(i)})\ \log (1 - h_\theta(x^{(i)}))\large] + \frac{\lambda}{2m}\sum_{j=1}^n \theta_j^2\)
Note: the 2nd sum explicitly skip j = 0 because we treat that separately as below
Resources:

Comments