Skip to content

An example of how to create a simple self-developed Logistic Regression from scratch in Python

Notifications You must be signed in to change notification settings

LarsNeR/LogisticRegression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

LogisticRegression

An example of how to create a simple self-developed Logistic Regression from scratch in Python

Main.py

Shows how to use LogisticRegression.py

LinearRegression.py

Contains the Logistic Regression using gradient descent

How to use

You can pull the repository the way it is. Running Main.py calls Logistic Regression with the iris dataset (with the first 100 samples). If you just want to use the Logistic Regression you have to optionally initialize it with the number of iterations and the learning rate and then call fit() with a Numpy Array X (m_samples, n_features) and a Numpy Array y (m_samples).

Contribution

If you have an idea how to improve this Logistic Regression keeping it as simple as possible please fork it and make a PR. I'm not 100% sure if it is working correctly, because there is no 'clean' Logistic Regression in scikit-learn with which I can compare my results.

About

An example of how to create a simple self-developed Logistic Regression from scratch in Python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages