Use a strait line to fit the data.

Cost Function

  • squared error cost function

Multiple Linear Regression

with multiple feature

Logistic Regression

A dedicated cost function since it may have lot’s of local minimum

Or equivalently:

Overfitting

  1. Collect more data
  2. Select features
  3. Reduce size of parameter (regularization)
    • Use to limit and if is really high it will become hence underfitting.
    • We only regulate not

Regularization

The equation for the cost function regularized linear regression is:

where:

For regularized logistic regression, the cost function is of the form

where: