You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the file doc/notebooks/06_learning_curves.ipynb, I believe there is a small mistake in the code box directly under the section "Cross-validation and Testing". The data that is supposed to be used for testing is defined by:
xtest = x[Ntrain:-Ntest]
ytest = y[Ntrain:-Ntest]
Making it the same data that is used for the Cross-Validation set. I think the above code should be replaced with:
xtest = x[-Ntest:]
ytest = y[-Ntest:]
I hope this helps and thanks for putting up this great tutorial. Your book has also been really helpful
The text was updated successfully, but these errors were encountered:
Also, is the test set defined only for illustrative purposes in this notebook?
In the second box in the same "Cross-validation and Testing" section a test error is initialized as: test_err = np.zeros(len(degrees))
but never used.
Unless I'm mistaken, there's also a small bug in the third code box in the "Learning Curves: Exploring the Bias-Variance Tradeoff" section. When calculating the 1st order polynomial error for the three (x_new, y_new) points, shouldn't print abs(np.sin(x_new) - y_new)
be instead print abs(np.sin(2 * x_new) - y_new)
In the file doc/notebooks/06_learning_curves.ipynb, I believe there is a small mistake in the code box directly under the section "Cross-validation and Testing". The data that is supposed to be used for testing is defined by:
xtest = x[Ntrain:-Ntest]
ytest = y[Ntrain:-Ntest]
Making it the same data that is used for the Cross-Validation set. I think the above code should be replaced with:
xtest = x[-Ntest:]
ytest = y[-Ntest:]
I hope this helps and thanks for putting up this great tutorial. Your book has also been really helpful
The text was updated successfully, but these errors were encountered: