Icon

Model selection with validation, cross validation and regularization. Polynomial regression

<p>This workflow is designed to illustrate the process of model selection. The considered models are polynomials of degree 1 to 10.</p><p>It is shown that training error always decreases with degree (i.e., with model flexibility). Initially, test error also decreases with degree but, in stark contrast with training error, test error ends up increasing (overfitting). This is shown estimating the test error both with validation and cross validation.</p><p>Finally, we illustrate how you can use regularization to reduce overfitting.</p>

This workflow is designed to illustrate the process of model selection. The considered models are polynomials of degree 1 to 10.

It is shown that training error always decreases with degree (i.e., with model flexibility). Initially, test error also decreases with degree but, in stark contrast with training error, test error ends up increasing (overfitting). This is shown estimating the test error both with validation and cross validation.

Finally, we illustrate how you can use regularization to reduce overfitting.

Training error vs degree
Regularization
Test error (validation) vs degree
Test error (cross validation) vs degree
Select a degree for the polynomial
Integer Widget
Column Renamer
Read data. Target generated withg[x_] := 200 + 1000 x - 80 x^2 + x^3;plus noise
CSV Reader
Conduct a polynomial regression with the selected degree
Polynomial regression
Plot the data
Scatter Plot

Nodes

Extensions

Links