Skip to main content

A lightweight machine learning library built from scratch by IFRI IA students

Project description

ifri_mini_ml_lib

PyPI version Coverage

A lightweight, educational machine learning library reimplementing core algorithms from scratch, inspired by scikit-learn. Developed by IFRI AI students for the Concepts & Applications of Machine Learning course.


Features

  • Core machine learning algorithms for:
    • Classification (Decision Trees, KNN, Logistic Regression)
    • Regression (Linear, Polynomial, SVR)
    • Clustering (K-means, DBSCAN, Hierarchical)
    • Association Rules (Apriori, Eclat, FP-Growth)
    • Neural Networks (MLP)
  • Model selection tools (Cross-validation, Grid Search, etc.)
  • Preprocessing utilities (scalers, encoders, missing value handlers, etc.)
  • Focus on transparency and understanding of ML model internals

Installation

Install from PyPI:

pip install ifri-mini-ml-lib

Or install from source:

git clone https://github.com/IFRI-AI-Classes/ifri_mini_ml_lib.git
cd ifri_mini_ml_lib
pip install -e .

Quick Start

Here's a simple example using the KNN classifier:

from ifri_mini_ml_lib.classification import KNN

# Example data
data = [[0, 0], [1, 1], [0, 1], [1, 0]]
labels = [0, 1, 1, 0]

# Initialize and fit the model
knn = KNN(k=3)
knn.fit(data, labels)

# Predict
prediction = knn.predict([[0.9, 0.8]])
print(prediction)

Documentation

Full documentation is available at: ifri_mini_ml_lib.github.io

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

Acknowledgments

Thanks to the IFRI AI students and faculty who contributed to this project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ifri_mini_ml_lib-0.2.1.tar.gz (88.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ifri_mini_ml_lib-0.2.1-py3-none-any.whl (118.8 kB view details)

Uploaded Python 3

File details

Details for the file ifri_mini_ml_lib-0.2.1.tar.gz.

File metadata

  • Download URL: ifri_mini_ml_lib-0.2.1.tar.gz
  • Upload date:
  • Size: 88.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ifri_mini_ml_lib-0.2.1.tar.gz
Algorithm Hash digest
SHA256 384d1f28a0231690e3f42319f429057892075451c75dc19c63cc40a6e39927bb
MD5 7686617af368a787884048de937fe59c
BLAKE2b-256 69f2620a7ada55423666fee94feed432c0a1f4d8b2f3879f5d2c2c11fe74f048

See more details on using hashes here.

File details

Details for the file ifri_mini_ml_lib-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ifri_mini_ml_lib-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 19835b46d78b22f0c5a87b43f97e9e6231045067da5e8343e86e5fa15563442c
MD5 6c7c35dda1dab8e1df171cbc3f49345e
BLAKE2b-256 16aa418ff8c0b5c0e201647bb34ef7d4c8da8011f5bde4a0cb161502f8181d4d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page