Skip to content

ML algorithms implemented from scratch using numpy and built in functions in python

Notifications You must be signed in to change notification settings

vivitsaS/ml-from-scratch

Repository files navigation

Machine Learning Algorithms From Scratch

This repository contains a collection of machine learning algorithms implemented from scratch using Python and NumPy. Each algorithm is accompanied by detailed explanations, code, and usage examples.

Motivation

As an early professional, I embarked on the journey of implementing machine learning algorithms from scratch for several reasons:

  • Deep Understanding: Implementing algorithms from scratch provides a deep understanding of how they work under the hood. It allows me to grasp the core principles and mathematical foundations behind machine learning.

  • Problem-Solving Skills: Writing algorithms from scratch hones my problem-solving skills. I've had to address various challenges and optimize code for performance and accuracy.

  • Customization: Implementing algorithms from scratch allows for customization. I can fine-tune the models to fit specific use cases and experiment with variations and enhancements.

  • Educational Resource: This repository serves as an educational resource for others who want to learn about machine learning. It provides clear explanations and practical examples to demystify complex concepts.

  • Contributions to the Community: By sharing these implementations, I hope to contribute to the machine learning community. Others can benefit from the code and insights I've gained so far.

Overview

This repository is dedicated to providing educational resources and hands-on examples for machine learning enthusiasts and practitioners. Whether you're a beginner looking to understand the fundamentals or an experienced data scientist seeking to dive deeper into the algorithms, you'll find valuable content here.

Algorithms

Here are some of the machine learning algorithms implemented in this repository:

  • Linear Regression
  • Logistic Regression
  • k-Nearest Neighbors (KNN)
  • Support Vector Machine (SVM)
  • Naive Bayes Classifier
  • Perceptron
  • Decision Trees
  • ...and more!

Directory Structure

The repository is organized into individual folders, with each folder corresponding to a specific machine-learning algorithm. In each algorithm folder, you will typically find the following structure:

  • algorithm.py: The Python script containing the implementation of the algorithm using NumPy.
  • README.md: A detailed documentation file for the algorithm, including algorithm fundamentals, intuition and math behind it, implementation details, how to use, possible variations and modifications, advantages and limitations and ideal use cases.
  • visualizer: Some algorithms are accompanied by straightforward visual aids for enhanced comprehension.

Dependencies

The algorithms in this repository are purely written in NumPy, emphasizing minimal dependencies. To run the example usage code and work with the algorithms, please ensure you have the required libraries installed. You can install them using the provided requirements.txt file. Use the following command to install the dependencies:

pip install -r requirements.txt

Getting Started

If you're new to this repository, here's how you can get started:

  • Choose an algorithm folder from the repository's root directory.
  • Read the README.md file for that algorithm, which provides comprehensive information about the algorithm, its implementation, and usage.
  • Explore the Python script (algorithm.py) for the algorithm's implementation.

Acknowledgements

This was inspired by various machine-learning courses and tutorials. Special thanks to

Contact

If you have any questions or feedback, feel free to contact me at vivitsa.shankar99@gmail.com.

Happy learning and coding!

About

ML algorithms implemented from scratch using numpy and built in functions in python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages