rafaelgreca / scratchml

A Python library called ScratchML was created to build the most fundamental Machine Learning models from scratch (using only Numpy), emphasizing producing user-friendly, straightforward, and easy-to-use implementations for novices and enthusiasts.
MIT License
1 stars 3 forks source link
decision-tree kmeans knn machine-learning multilayer-perceptron pca perceptron python random-forest scratch

Badges

ScratchML

A Python library called ScratchML was created to build the most fundamental Machine Learning models from scratch (using only Numpy), emphasizing producing user-friendly, straightforward, easy-to-use, well-organized implementations for novices and enthusiasts.

Disclaimer: This library is not intended to surpass those that already exist and which are better, more optimized, and with more diversity of implemented algorithms (such as scikit-learn, PyTorch, Keras, and Tensorflow), but rather to provide code that is easier to understand, simple, and friendly for beginners and enthusiasts in the field of artificial intelligence who wish to gain a deeper understanding of how algorithms work or who want to contribute to an open-source repository.

Installation

To install this package, first clone the repository to the directory of your choice using the following command:

git clone https://github.com/rafaelgreca/scratchml.git

Using Virtual Environment

Create a virtual environment (ideally using conda) and install the requirements with the following command:

conda create --name scratchml python=3.11.9
conda activate scratchml
pip install -r requirements/requirements.txt

Using Docker

Build the Docker image using the following command:

sudo docker build -f Dockerfile -t scratchml . --no-cache

Run the Docker container using the following command:

sudo docker run -d -p 8000:5000 --name scratchml scratchml

Usage/Examples

See the examples folder to see some use cases.

Running Tests

Locally

Run the following command on the root folder:

python3 -m unittest discover -p 'test_*.py'

Using Docker

Build the Docker image using the following command:

sudo docker build -f test.Dockerfile -t test_scratchml . --no-cache

Run the Docker container using the following command:

sudo docker run -d -p 8001:5000 --name test_scratchml test_scratchml

Roadmap

Implementations:

Feedback

If you have any feedback, please feel free to create an issue pointing out whatever you want or reach out to me at rgvieira97@gmail.com

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 read carefully the Contributing Guide and the Code of Conduct before contributing.

Acknowledge

We would like to thank all these amazing materials and repositories for their amazing work, which indirectly contributed in some sort or that inspired us to create this project.

License

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

Authors

A huge shoutout to everyone who contributed to the success of the project. Check everyone here!.