Skip to content

AxelGard/pico-learn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pico-learn

A super small version of sklearn implemented using numpy

drawing

This is not really made for you to use, mainly for learning purposes.

The inspiration for this project came from tinygrad and micrograd, but instead of focusing on neural networks, Pico focuses on more classic machine learning, similar to scikit-learn.

The project is named pico due to how small and incomplite it is.

Usage

import numpy as np
from picolearn.linear import LinearRegrasion 


X = np.array([[1, 1], [1, 2], [2, 2], [2, 3]])
y = np.dot(X, np.array([1, 2])) + 3
X_test = np.array([[3, 5]])


model = LinearRegression()
model.fit(X, y)
y_pred = model.predict(X_test)

Model implemented

this are the model that have been implemented and is planed to be implemented

  • Linear Regreassion
  • KNN Regreassion
  • KNN Classifier
  • Support Vector Machine Classifier
  • Decision Tree Classifier
  • Neural Network??
  • KMeans??
  • Random Forest ??

Implementation validation

Each model is implemented then compared to Sklearns equivelent model. This can be seen in the tests.

install

Due to pico is made for learning purposes I have not added it to PyPi.

But if you want to try it out this is how:

clone the repo

git clone https://github.com/AxelGard/pico-learn.git && cd pico-learn

setup a python env

python3 -m venv env && source env/bin/activate

install dependacies and pico

pip install -r ./requirements.txt && pip install -e .

About

A super small version of sklearn implemented using numpy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages