Skip to content

In this project I tried to implement linear regression and regularized linear regression by my own and compare performance to sklearn model.

Notifications You must be signed in to change notification settings

FarzamTP/Linear-Regression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linear Regression

Linear regression is a linear algorithm in machine learning. In this project I tried to implement linear regression and all of its optimization my own.

In this class which takes different arguments such as: X, y, theta, num_iter, learning_rate, verbose

Sample Output

Note: Dataset used for this project data.txt is the dataset from machine learning course presented by Prof.Andrew Ng

This is the dataset plotted by plot_data() function.

Image of data points

NOTE: Blue dots represents data points.

By training the algorithm, following cost history will be calculated:

Image of Cost history

And at last Theta parameters which represents coefficients are computed through gradient descent optimization algorithm and decision boundary will be drawn as follows:

Image of decision boundary

Conclusion

At last but not least, I would highly appreciate any comments about this projects. Thanks in advance

About

In this project I tried to implement linear regression and regularized linear regression by my own and compare performance to sklearn model.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages