Overview
- Getting more training examples
- Trying smaller sets of features
- Trying additional features
- Trying polynomial features
- Increasing or decreasing λ
Split Into Training and Test Set
- A hypothesis may have a low error for the training examples but still be inaccurate (because of overfitting).
- Thus, to evaluate a hypothesis, given a dataset of training examples, we can split up the data into two sets:
- a training set and
- a test set.
- Typically, the training set consists of 70 % of your data and the test set is the remaining 30 %.
Evaluating the Hypothesis by looking at the Test Error value
- Learn Θ, then minimise Jtrain (Θ) using the training set.
- Compute the test set error Jtest(Θ)
How to compute the Test Error
The test error is a ratio value which gives an indication of the percentage of
For Linear Regression:

For Classification ~ Misclassification error (aka 0/1 misclassification error):