Implement and compare 5 different linear regression methods.
- Least-squares (LS)
- Regularized LS (RLS)
- L1-regularized LS (LASSO)
- Robust regression (RR)
- Bayesian regression (BR)
1. plotErrorOfTrianSize(x_samples_all, y_samples_all, x_poly, y_poly, order )
2. plotBestFitOfAllData(x_samples_all, y_samples_all, x_poly, y_poly, order, plotFlag= True)
3. plotFitOfOutlierData(x_samples_all, y_samples_all, x_poly, y_poly, order, plotFlag= True)
4. findBestAlphaAndBeta(x_samples_all, y_samples_all, x_poly, y_poly, order, plotFlag= True)
5. plotFitOfHighOrderData()
6. testFitOfHighOrderData()
An application of regression
This is an assignment of my ML course, and those training and testing data come from this class, so you may not allow to use it for business purpose.