Skip to main content

🚀 MLPY - Modern Machine Learning Framework for Python

Python 3.8+ License: MIT Tests Coverage Documentation

MLPY es un framework moderno y extensible de aprendizaje automático para Python, inspirado en mlr3. Proporciona una interfaz unificada, componible y orientada a objetos para tareas de machine learning.

✨ Características Principales

  • 🎯 API Unificada: Interfaz consistente para clasificación, regresión, clustering y más
  • 🧩 Diseño Modular: Bloques componibles para flujos de trabajo complejos
  • 🔧 Altamente Extensible: Fácil integración de nuevos learners, medidas y transformaciones
  • 📊 Evaluación Robusta: Múltiples estrategias de resampling y medidas de rendimiento
  • 🤖 AutoML Integrado: Optimización automática de hiperparámetros y feature engineering
  • ⚡ Alto Rendimiento: Paralelización nativa y backends optimizados
  • 🔍 Explicabilidad: Interpretación de modelos con SHAP, LIME y más
  • 📈 Visualización Rica: Gráficos interactivos para análisis de resultados
  • 🔗 Integración Total: Compatible con scikit-learn, XGBoost, LightGBM, PyTorch

📦 Instalación

Instalación Básica

pip install mlpy

Instalación Completa (todas las dependencias)

pip install mlpy[all]

Instalación para Desarrollo

git clone https://github.com/your-org/mlpy.git
cd mlpy
pip install -e .[dev]

🚀 Inicio Rápido

Ejemplo Básico de Clasificación

import pandas as pd
from mlpy.tasks import TaskClassif
from mlpy.learners.sklearn import LearnerRandomForestClassifier
from mlpy.resamplings import ResamplingCV
from mlpy.measures import MeasureClassifAccuracy

# Cargar datos
data = pd.read_csv("iris.csv")

# Crear tarea de clasificación
task = TaskClassif(data=data, target="species")

# Crear learner
learner = LearnerRandomForestClassifier(n_estimators=100, random_state=42)

# Configurar cross-validation
cv = ResamplingCV(folds=5)

# Entrenar y evaluar
learner.train(task)
predictions = learner.predict(task)

# Medir rendimiento
measure = MeasureClassifAccuracy()
accuracy = measure.score(predictions.truth, predictions.response)
print(f"Accuracy: {accuracy:.2%}")

Pipeline Completo con AutoML

from mlpy.automl import AutoML
from mlpy.tasks import TaskRegr

# Crear tarea
task = TaskRegr(data=data, target="price")

# Configurar AutoML
automl = AutoML(
    task=task,
    time_budget=300,  # 5 minutos
    metric="rmse"
)

# Ejecutar optimización
best_model = automl.fit()

# Hacer predicciones
predictions = best_model.predict(task)

📚 Documentación Completa

Guías Principales

Casos de Uso

🏗️ Arquitectura

mlpy/
├── core/           # Componentes fundamentales
├── tasks/          # Definición de tareas ML
├── learners/       # Algoritmos de aprendizaje
├── measures/       # Métricas de evaluación
├── resamplings/    # Estrategias de validación
├── pipelines/      # Pipelines de procesamiento
├── automl/         # AutoML y optimización
├── validation/     # Validación de datos
├── backends/       # Backends de computación
└── visualization/  # Herramientas de visualización

🎯 Modelos Disponibles

Clasificación

  • Random Forest, Gradient Boosting, XGBoost, LightGBM
  • SVM, Logistic Regression, Naive Bayes
  • Redes Neuronales (MLP, CNN, RNN)
  • Deep Learning con PyTorch

Regresión

  • Linear/Ridge/Lasso/ElasticNet
  • Random Forest, Gradient Boosting
  • Support Vector Regression
  • Redes Neuronales

Clustering

  • K-Means, DBSCAN, Hierarchical
  • Gaussian Mixture Models
  • Spectral Clustering
  • HDBSCAN con auto-tuning

Deep Learning

  • LSTM, GRU, BiLSTM para series temporales
  • Transformers para NLP
  • CNNs para visión por computadora

📊 Benchmarking

from mlpy.benchmark import Benchmark

# Configurar benchmark
benchmark = Benchmark(
    tasks=[task1, task2],
    learners=[learner1, learner2, learner3],
    resamplings=[cv, holdout],
    measures=[accuracy, auc, f1]
)

# Ejecutar
results = benchmark.run(parallel=True)

# Visualizar
results.plot_comparison()
results.to_latex("results.tex")

🧪 Testing

El framework incluye una suite completa de tests:

# Ejecutar todos los tests
pytest tests/

# Con coverage
pytest --cov=mlpy tests/

# Tests rápidos de validación
python test_quick_validation.py

Estado actual:

  • ✅ 7/7 tests de validación pasando
  • ✅ 29/34 tests unitarios pasando (85%)
  • 📊 16.28% coverage de código

🤝 Contribuir

¡Las contribuciones son bienvenidas! Por favor:

  1. Fork el repositorio
  2. Crea una rama para tu feature (git checkout -b feature/AmazingFeature)
  3. Commit tus cambios (git commit -m 'Add AmazingFeature')
  4. Push a la rama (git push origin feature/AmazingFeature)
  5. Abre un Pull Request

📈 Roadmap

v2.1 (Actual)

  • ✅ Model Registry completo
  • ✅ Deep Learning models (LSTM, GRU, Transformers)
  • ✅ Advanced clustering con auto-tuning
  • ✅ Sistema de validación mejorado

v3.0 (Próximo)

  • MLOps completo (tracking, deployment)
  • AutoML mejorado con NAS
  • Distributed training
  • GUI interactiva

📝 Licencia

Este proyecto está licenciado bajo la Licencia MIT - ver el archivo LICENSE para más detalles.

🙏 Agradecimientos

  • Inspirado en mlr3 de R
  • Construido sobre scikit-learn
  • Integración con el ecosistema Python ML

📞 Contacto


⭐ Si te gusta MLPY, dale una estrella en GitHub!

Hecho con ❤️ por la comunidad MLPY

Metadata

Release files for mlpy-geo 0.1.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 mlpy-geo 0.1.0
File Size Uploaded Provenance Actions
mlpy_geo-0.1.0.tar.gz 508.2 kB Without provenance Details for mlpy_geo-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mlpy-geo 0.1.0
File Interpreter ABI Platform Actions
mlpy_geo-0.1.0-py3-none-any.whl Python 3 none any Details for mlpy_geo-0.1.0-py3-none-any.whl

Total release size: 535.5 kB

Release files / mlpy_geo-0.1.0.tar.gz

Download URL mlpy_geo-0.1.0.tar.gz
Size 508.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e50422e971cc3504fa8fe0c6cddccd06710adbae37efb03406035430e740f333
BLAKE2b-256 checksum
How to use checksums
2eab4710e34cdc97bcb717f8a1f395485ab8be122186fafff3236927be293d61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.1

Release files / mlpy_geo-0.1.0-py3-none-any.whl

Download URL mlpy_geo-0.1.0-py3-none-any.whl
Size 27.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a6049e87890107d167eae0bc7459edfc8c4593193815677e91452477011e8bb9
BLAKE2b-256 checksum
How to use checksums
f7d4b9dde5341d0beb6724389b0baa880fefa055b7c3211c170fde2ec1129be5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.1

Security for mlpy-geo 0.1.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.1.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