Professional Documents
Culture Documents
Bias
● bias:
difference between average model prediction
(across data sets) and the target
variance
Price
Price
Size Size Size
x2 x2 x2
x1 x1 x1
( = sigmoid function)
Andrew Ng
Addressing overfitting:
size of house
Price
no. of bedrooms
no. of floors
age of house
average income in neighborhood Size
kitchen size
Andrew Ng
Addressing overfitting:
Options:
1. Reduce number of features.
― Manually select which features to keep.
― Model selection algorithm (later in course).
2. Regularization.
― Keep all the features, but reduce magnitude/values of
parameters .
― Works well when we have a lot of features, each of
which contributes a bit to predicting .
Andrew Ng
Regularization
Cost function
Machine Learning
Intuition
Price
Price
Andrew Ng
Regularization.
Andrew Ng
Regularization.
Price
Size of house
Andrew Ng
In regularized linear regression, we choose to minimize
Size of house
Andrew Ng
Regularized linear regression
Regularized linear regression
Gradient descent
Repeat
Andrew Ng
Regularized Logistic Regression
Regularized logistic regression.
x2
x1
Cost function:
Andrew Ng
Gradient descent
Repeat
Andrew Ng