1
$\begingroup$

Why learning curve of scikit-learn (example here) is different from the one which was taught by andrew NG in his machine learning course at Coursera

as per Andrew NG, Training Error should start from zero & increases with training size as it generalizes the Data. The Validation error decreases with training size. But as per scikit-learn it gives us opposite plot i.e., training error decreases and validation error increases. Please Explain?

$\endgroup$

1 Answer 1

1
$\begingroup$

It depends on what is shown on the y-axis: score or error.

The scikit-learn example you linked to shows the score (mean accuracy in the case of Naive Bayes and SVM) as a function of the number of training examples. As you would expect, as the number of training examples grows, training accuracy decreases and CV accuracy increases.

If you were to plot the error on the y axis instead, you get the opposite behaviour: training error increases and CV error decreases as the number of training examples grows.

I suspect the learning curve used in the ML course shows the error (MSE if I remember correctly) as a function of the number of training examples. Hence the different plots.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.