/ML-algorithms-from-scratch

A python only implementation of the Algorithms used for ML from scratch.

Primary LanguagePythonMIT LicenseMIT

ML Algorithms from scratch

A python only implementation of the Algorithms used for ML from scratch.

Note: This project uses external dependencies for the testing of the algorithms.

Available algorithms

  • Linear regression (linear_regression)
  • Logistic regression (logistic_regression)
  • Decision Trees (decision_tree)
  • Adaboost (adaboost)
  • Random forest (random_forest)
  • Naive Bayes (naive_bayes)
  • KNN (knn)
  • KMeans (kmeans)
  • PCA [Principal component analysis] (pca)
  • SVM (svm)

Installation and usage.

This project has 4 dependencies.

  • numpy for the maths implementation and writing the algorithms
  • Scikit-learn for the data generation and testing.
  • Matplotlib for the plotting.

This project uses pipenv for dependency management. You need to ensure that you have pipenv installed on your system.

Here's how to install the dependencies, and get started.

  • Install it using pipenv sync -d
  • Once done, Activate the environment using pipenv shell.

Now, You're ready to run the Algorithms!

You can run them using python -m algorithms.<algorithm_name>, Where <algorithm_name> needs to be replaced with a valid algorithm name. Check the supported algorithms to see which ones are available.

Contributing

Contributions, issues and feature requests are welcome. After cloning & setting up project locally, you can just submit a PR to this repo and it will be deployed once it's accepted.

⚠️ It’s good to have descriptive commit messages, or PR titles so that other contributors can understand about your commit or the PR Created. Read conventional commits before making the commit message.

Show your support

We love people's support in growing and improving. Be sure to leave a ⭐️ if you like the project and also be sure to contribute, if you're interested!

Made by Sunrit Jana with ❤️