Linear regression with regularization, with the regularization parameter estimated from cross-validation.
Function y = f(x) = x2 + 10 to create a random sample (xj, yj) (training data) of size 12 (that is, j = 1 to 12), by uniform random sampling of x in -2 <= x <= 10.
See https://pipenv.readthedocs.io/en/latest/install/#installing-pipenv to install pipenv, if you do not have it.
To run this program:
pipenv run python main.py
- Abu-Mostafa, Yaser S. Learning from Data: a Short Course. AMLBooks, 2012.