HW-1 CS365A


SMALL TRAINING SET

Training

  1. Degree-0
  2. Degree-1
  3. Degree-2
  4. Degree-3
  5. Degree-5
  6. Degree-9

Testing

  1. Degree-0
  2. Degree-1
  3. Degree-2
  4. Degree-3
  5. Degree-5
  6. 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.9327.89
3 1.25-12.5479.68-85.14
5 3.88-90.91827.6-3.64e+037.8e+03-6.42e+03
9 -2.53109.3-2.07e+032.26e+04-1.54e+057.11e+05-2.12e+064.028e+06-4.37e+062.07e+06


BIG TRAINING SET

Training

  1. Degree-0
  2. Degree-1
  3. Degree-2
  4. Degree-3
  5. Degree-5
  6. Degree-9

Testing

  1. Degree-0
  2. Degree-1
  3. Degree-2
  4. Degree-3
  5. Degree-5
  6. 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.2814.06-19.5
3 -0.248.93-12.8227.56
5 -0.041.50-18.91119.2-321.4353.1
9 -0.00020.013-0.355.35-49.14289.3-1.09e+032.62e+03-3.57e+032.16e+03


FINAL ANALYSIS


Code