Solved – validation error be higher than training error

cross-validationmachine learning

I was reading about learning curve and in a page, this curve is shown:

enter image description here

But I think something is wrong with it. If an estimator tunes it parameters on validation set, then validation error should be lower than training error. Because we have tuned estimator's hyper parameters to achieve the best result on validation error.
Why is training error lower than validation error in this figure?

Best Answer

Training error tends to be lower than cross validation error. This is an intuitive explanation, ignoring the random effects: In cross validation, you divide the train set T into two parts T1 and T2, train on T1 and test on T2. You tune the parameter to minimize the error on T2, but the validation error on T2 tends to be higher than the train error on T1 : $$er(T1)<e(T2)$$ because you train the model on T1 and have more opportunity to fit the model on it. On the other hand, er(T1)~er(T) as you train the model with the same tuned parameter on T1 and T. All together $$er(T2)>er(T)$$ which is what you also see in the diagram.

Related Question