Skip to content

sawyer7246/LinearRegressionCompare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

LinearRegressionCompare

Implement and compare 5 different linear regression methods.

  • Least-squares (LS)
  • Regularized LS (RLS)
  • L1-regularized LS (LASSO)
  • Robust regression (RR)
  • Bayesian regression (BR)

There are several methods in the main() for different usage.

testDifferentRegressionModels()

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()

predictPeopleCount()

An application of regression

One more thing

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.

About

Compare 5 different linear regression methods

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages