Skip to main content

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.

Metadata

Release files for ifri-mini-ml-lib 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ifri-mini-ml-lib 0.2.1
File Size Uploaded
ifri_mini_ml_lib-0.2.1.tar.gz 88.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ifri-mini-ml-lib 0.2.1
File Interpreter ABI Platform
ifri_mini_ml_lib-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 206.8 kB

Release files / ifri_mini_ml_lib-0.2.1.tar.gz

Download URL ifri_mini_ml_lib-0.2.1.tar.gz
Size 88.0 kB
Tags Source
SHA-256 checksum
How to use checksums
384d1f28a0231690e3f42319f429057892075451c75dc19c63cc40a6e39927bb
BLAKE2b-256 checksum
How to use checksums
69f2620a7ada55423666fee94feed432c0a1f4d8b2f3879f5d2c2c11fe74f048
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / ifri_mini_ml_lib-0.2.1-py3-none-any.whl

Download URL ifri_mini_ml_lib-0.2.1-py3-none-any.whl
Size 118.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
19835b46d78b22f0c5a87b43f97e9e6231045067da5e8343e86e5fa15563442c
BLAKE2b-256 checksum
How to use checksums
16aa418ff8c0b5c0e201647bb34ef7d4c8da8011f5bde4a0cb161502f8181d4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page