Skip to content

Implementation of logistic regression (without any machine learning library) on MNIST dataset. Includes 1 vs All classification

Notifications You must be signed in to change notification settings

khawar56/Logistic-Regression-From-Scratch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Logistic-Regression-From-Scratch

Implementation of logistic regression without any machine learning library like Sikit or Keras

This implementation is based on MNIST dataset, for other datasets few modifications might be required. There's no need to download the dataset seperately, code will download itself.

How to run

All the python code is present in well formatted google colab notebook in the repository, barely few clicks are needed to re run the whole algorithm from training to testing. Dataset will be download automatically by running the cell

Implementation includes

  • Data Preperation
  • Logistic Regression
    • line fit
    • sigmoid function
    • cost function
    • gradient decent
    • auto training stop if convergence differnece for two consecutive itterations is less than a given value
  • Accuracy of each cllasifier on respective binary dataset
  • Cost vs Itterations plot for all the classfiers
  • One vs All classifier's accuracy on original dataset

Code Walkthrough

I've made a walkthrough tutorial of this algorithm on youtube, do check it out too. I explain things in greater details in the video

Youtube link - https://youtu.be/oYVdzBjkiZ4

About

Implementation of logistic regression (without any machine learning library) on MNIST dataset. Includes 1 vs All classification

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published