/Binary_Classification_From_Scratch

A Binary Classification From Scratch, very simple algorithm to classify simple data

Primary LanguagePythonMIT LicenseMIT

Binary Classification From Scratch


Logo

Details

  • A very simple Binary Classification From Scratch. I did not use Scikit-Learn or any similar libraries.
    The main point from this is to understand how Logistic Regression works in the backgroud. Understand the math and the concept of it is much important using a library with 2 lines to train the model! At least for a beginner like me :)

  • I have used a dataset found online, it is very simple! we have 2 features and 2 possible outputs 1 or 0. I calculated the accuracy which is equal to the Total Correct Answers (whether the predicted is 1 and the actual value is 1 OR predicted = 0 and the actual is 0) / The Total samples numbers. I used scipy.optimize for optimization and Cross-Entropy Loss as a Cost Function. And Sigmoid Function as an Activation Function


Tech Stack

  • Python: Version 3.10

  • SciPy: Version 1.9.1

  • NumPy: Version 1.23.0

  • Pandas: Version 1.4.3

Contributing

Contributions are what makes the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Do not forget to give the project a star! Thanks again!


License

Distributed under the MIT License. See LICENSE.txt for more information.

References

  • Very explained resource on which I depended a lot to develop this algorithm Helpful Video

Contacts