FarzamTP / Logistic-Regression

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Logistic-regression

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

Model Description

In class LogisticRegression the class takes different args that you need to modify according to your dataset. here in this project I used machine learning course presented by Prof.Andrew Ng exercise 2 dataset that contains 100 rows and 3 columns.

Note: This project is also supporting regularized logistic regression which can be used by setting Lambda args to something not 0.

Sample Output

Here you can see how the algorithm acts and plots cost history: Image of cost function in non-regularized algorithm

As you see the cost values reduced over time and almost converged to 0.

And here you can see the decision boundary: Image of decision boundary over non-regularized algorithm

Conclusion

At last but not least, I highly appreciate any comment over this project. Thanks in advance

About

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


Languages

Language:Python 100.0%