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.
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
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
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
See the examples
folder to see some use cases.
Run the following command on the root folder:
python3 -m unittest discover -p 'test_*.py'
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
Implementations:
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
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.
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.
Distributed under the MIT License. See LICENSE for more information.
A huge shoutout to everyone who contributed to the success of the project. Check everyone here!.