HW-1 CS365A
SMALL TRAINING SET
Training
- Degree-0
- Degree-1
- Degree-2
- Degree-3
- Degree-5
- Degree-9
Testing
- Degree-0
- Degree-1
- Degree-2
- Degree-3
- Degree-5
- Degree-9
MSE for small training, validation and testing data corresponding to the degree of polynomial:
Degree |
0 |
1 |
2 |
3 |
5 |
9 |
Training Data |
5.477e+03 |
244.1 |
147.9 |
140.2 |
14.77 |
2.21e-13 |
Validation Data |
2.95e+04 |
2.01e+03 |
123.0 |
1.08e+03 |
2.51e+06 |
4.69e+10 |
Test Data |
3.92e+05 |
7.91e+04 |
620.7 |
3.98e+05 |
2.65e+10 |
6.85e+17 |
Test error for optimal polynomial degree (2) = 620.7
Accuracy for small dataset
Polynomial Coefficient table for small training set:
Degree |
w_0 |
w_1 |
w_2 |
w_3 |
w_4 |
w_5 |
w_6 |
w_7 |
w_8 |
w_9 |
0 |
156.5 | | | | | | | | | |
1 |
50.37 | -82.82 | | | | | | | | |
2 |
5.4 | -0.93 | 27.89 | | | | | | | |
3 |
1.25 | -12.54 | 79.68 | -85.14 | | | | | | |
5 |
3.88 | -90.91 | 827.6 | -3.64e+03 | 7.8e+03 | -6.42e+03 | | | | |
9 |
-2.53 | 109.3 | -2.07e+03 | 2.26e+04 | -1.54e+05 | 7.11e+05 | -2.12e+06 | 4.028e+06 | -4.37e+06 | 2.07e+06 |
BIG TRAINING SET
Training
- Degree-0
- Degree-1
- Degree-2
- Degree-3
- Degree-5
- Degree-9
Testing
- Degree-0
- Degree-1
- Degree-2
- Degree-3
- Degree-5
- Degree-9
MSE for big training, validation and testing data corresponding to the degree of polynomial:
Degree |
0 |
1 |
2 |
3 |
5 |
9 |
Training Data |
2.24e+04 |
452.9 |
112.8 |
108.6 |
106.1 |
105.2 |
Validation Data |
1.66e+04 |
269.6 |
109.0 |
114.2 |
100.3 |
102.6 |
Test Data |
2.94e+05 |
2.78e+04 |
368.7 |
5.93e+03 |
4.20e+05 |
1.85e+07 |
Test error for optimal polynomial degree (2) = 368.7
Accuracy for big dataset
Polynomial Coefficient table for big training set:
Degree |
w_0 |
w_1 |
w_2 |
w_3 |
w_4 |
w_5 |
w_6 |
w_7 |
w_8 |
w_9 |
0 |
256.4 | | | | | | | | | |
1 |
67.63 | -166.3 | | | | | | | | |
2 |
4.28 | 14.06 | -19.5 | | | | | | | |
3 |
-0.24 | 8.93 | -12.82 | 27.56 | | | | | | |
5 |
-0.04 | 1.50 | -18.91 | 119.2 | -321.4 | 353.1 | | | | |
9 |
-0.0002 | 0.013 | -0.35 | 5.35 | -49.14 | 289.3 | -1.09e+03 | 2.62e+03 | -3.57e+03 | 2.16e+03 |
FINAL ANALYSIS
Code