Content | Next |
Logistic Regression
Cost Function for 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$$
where:
- m = number of examples
- n = number of parameters
- θ = vector of n parameters, θ0 = bias
- hΘ(x) = hypothesis that results in the k-th output
Content | Next |