In this repo. is the code to implement the following:
-
Using a polynomial estimator of degree 1, 5, 10, and 50, I am plotting the function obtained with each of the polynomials overlaid on the data
-
Plotting the MSE obtained on the training data and the test data as a function of the degree of the polynomial
-
Plotting the MSE, the squared Bias, and the Variance as a function of the degree of the polynomial
-
Creating a new estimator whose output is the average of the 4 estimators you created above (i.e. polynomials of degree 1, 5, 10, and 50). Plotting the function that is obtainned by overlaying on the data.
-
Creating a 100 estimators and take the 3 best estimators from them (possibly in terms of MSE on the training data). Using the average of the 3 best estimators to create a new estimator.
All of this is explained in the python notebook. Thanks for reading!