分类算法-逻辑回归
- Logistic (sigmoid) function:
- Cost function
- Iteration: the form is the same as linear regression
- Decision boundary:
That's a property of the hypothesis and of the parameters of the hypothesis and not a property of the data set.
- Predict
when
; predict
when
.
- Multiclass Classification: one-vs-all method
注意事项:
- {0(negative class),1(positive class)}
- 不适用线性回归
欠拟合与过拟合
Two main options to address the issue of overfitting:
- Reduce the number of features:
- Manually select which features to keep.
- Use a model selection algorithm (studied later in the course).
2. Regularization
- Keep all the features, but reduce the magnitude of parameters
- Regularization works well when we have a lot of slightly useful features.
where (palarization parameter) should be adequately large.
- Gradient descent
- Cost function
notice that is excluded!