Skip to content

Latest commit

 

History

History
22 lines (22 loc) · 1.22 KB

File metadata and controls

22 lines (22 loc) · 1.22 KB

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