Evaluating Hypothesis

Evaluating Hypothesis

In general, plotting won't help visualizing if we might be over-fitting or under-fitting

Split our dataset into 2 portions: 70% training set and 30% test set
We can use training set to create our hypothesis (learn parameter \(theta\)) then use test set to test our hypothesis by computing \(J_{test}(\theta)\)

If over-fitting: \(J(\theta)\) is low and \(J_{test}(\theta)\) is high
If under-fitting:  \(J(\theta)\) is low and \(J_{test}(\theta)\) is high
\(\text{Test Error} = \dfrac{1}{m_{test}} \sum^{m_{test}}_{i=1} err(h_\Theta(x^{(i)}_{test}), y^{(i)}_{test})\)
Resources:
https://www.coursera.org/learn/machine-learning/supplement/aFpD3/evaluating-a-hypothesis

Comments