Skip to main content

mltools

Utilitaires ML légers : normalisation, train/test split, encodage one-hot, standardisation.

Auteur : Mouhamed Diouf

Installation

pip install mltools-mouhameddiouf

Utilisation

import numpy as np
from mltools import normalize, train_test_split, one_hot_encode, standardize

# Normalisation min-max (entre 0 et 1)
X = np.array([[1, 2], [3, 4], [5, 6]])
X_norm = normalize(X)

# Standardisation (moyenne 0, écart-type 1)
X_std = standardize(X)

# Découpage train/test
y = np.array([0, 1, 0])
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.33)

# Encodage one-hot des labels
y_oh = one_hot_encode(y)

Fonctions disponibles

Fonction Description
normalize(X) Min-max scaling entre 0 et 1
standardize(X) Standardisation (moyenne 0, écart-type 1)
train_test_split(X, y, test_size, random_state) Découpe train/test
one_hot_encode(y) Encodage one-hot d'un vecteur de labels

Développement

# Installer en mode éditable avec les extras dev
pip install -e ".[dev]"

# Lancer les tests
pytest tests/ -v --cov=src/mltools

# Vérifier le style
ruff check src/

# Vérifier les types
mypy src/mltools/

Licence

MIT — voir le fichier LICENSE.

Metadata

Release files for mltools-mouhameddiouf 0.2.0

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

Source distribution (sdist)

Source distribution for mltools-mouhameddiouf 0.2.0
File Size Uploaded Provenance Actions
mltools_mouhameddiouf-0.2.0.tar.gz 3.8 kB Without provenance Details for mltools_mouhameddiouf-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mltools-mouhameddiouf 0.2.0
File Interpreter ABI Platform Actions
mltools_mouhameddiouf-0.2.0-py3-none-any.whl Python 3 none any Details for mltools_mouhameddiouf-0.2.0-py3-none-any.whl

Total release size: 8.1 kB

Release files / mltools_mouhameddiouf-0.2.0.tar.gz

Download URL mltools_mouhameddiouf-0.2.0.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b70dfddb8e88e073cdb48d4a722dac83d689b603c83415cb7ab84bf80854cd08
BLAKE2b-256 checksum
How to use checksums
6222bc79728f0e352db7c723b87c6cb691982cad6139e147ff1d373a448d3928
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / mltools_mouhameddiouf-0.2.0-py3-none-any.whl

Download URL mltools_mouhameddiouf-0.2.0-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a860bd61491c0338a1f7d2773b53425a298c98ecffa55e19730ed9cef02eebc1
BLAKE2b-256 checksum
How to use checksums
f0f027f76cc6b1a0c77071ae809c1c8da436f2bc2bb30d3c221f6b24912afedc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Security for mltools-mouhameddiouf 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

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