曹佳炯 21531076
polynomial regression for single variable
I use 2 methods.
- Gradient descent
The code includes main.py and Regression.py. - Directly solving the matrix equation by least quare
The code includes LSmain.py and LSRegression.py. - I also use functions in lib to run the expriment. The code is Polyfit&&Lasso.py.
Since I use small group of data, so the second method is better and I put my results here
- Degree=3 Sample=10 Lamda=0
- Degree=9 Sample=10 Lamda=0
- Degree=9 Sample=15 Lamda=0
- Degree=9 Sample=100 Lamda=0
- Degree=9 Sample=10 Lamda=exp(-15)
You can see results for other methods in the /results folder.