Sobre el proyecto
Mlxtend (extensiones de aprendizaje automático) es una biblioteca de Python de herramientas útiles para las tareas diarias de ciencia de datos. Se utiliza principalmente para:
- Métodos de ensamblado como clasificadores de stacking y voting
- Técnicas de selección y extracción de características
- Utilidades de visualización (por ejemplo, regiones de decisión, matrices de confusión)
- Ayudas de trazado para el análisis de modelos
- Minería de patrones frecuentes, incluido el algoritmo Apriori para la minería de reglas de asociación
Sebastian Raschka 2014-2026
## Enlaces
- **Documentación:** [https://rasbt.github.io/mlxtend](https://rasbt.github.io/mlxtend)
- PyPI: [https://pypi.python.org/pypi/mlxtend](https://pypi.python.org/pypi/mlxtend)
- Registro de cambios: [https://rasbt.github.io/mlxtend/CHANGELOG](https://rasbt.github.io/mlxtend/CHANGELOG)
- Contribuir: [https://rasbt.github.io/mlxtend/CONTRIBUTING](https://rasbt.github.io/mlxtend/CONTRIBUTING)
- ¿Preguntas? Consulta el [tablero de GitHub Discussions](https://github.com/rasbt/mlxtend/discussions)
## Instalación de mlxtend
#### Uso de uv
Para añadir mlxtend a un proyecto gestionado con uv, ejecuta
```bash
uv add mlxtend
```
Para un comando puntual sin cambiar tu proyecto actual, ejecuta
```bash
uv run --with mlxtend python -c "import mlxtend; print(mlxtend.__version__)"
```
#### Versión de desarrollo
La versión de mlxtend en PyPI puede estar siempre un paso por detrás; puedes instalar la última versión de desarrollo desde el repositorio de GitHub ejecutando
```bash
uv add "mlxtend @ git+https://github.com/rasbt/mlxtend.git"
```
O bien, puedes bifurcar el repositorio de GitHub desde https://github.com/rasbt/mlxtend y ejecutar mlxtend desde tu copia local mediante
```bash
git clone https://github.com/<your_username>/mlxtend.git
cd mlxtend
uv sync --group dev
uv run python -c "import mlxtend; print(mlxtend.__version__)"
```
## Ejemplos
```python
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
import itertools
from sklearn.linear_model import LogisticRegression
from sklearn.svm import SVC
from sklearn.ensemble import RandomForestClassifier
from mlxtend.classifier import EnsembleVoteClassifier
from mlxtend.data import iris_data
from mlxtend.plotting import plot_decision_regions
# Inicialización de clasificadores
clf1 = LogisticRegression(random_state=0)
clf2 = RandomForestClassifier(random_state=0)
clf3 = SVC(random_state=0, probability=True)
eclf = EnsembleVoteClassifier(clfs=[clf1, clf2, clf3], weights=[2, 1, 1], voting='soft')
# Carga de algunos datos de ejemplo
X, y = iris_data()
X = X[:,[0, 2]]
# Trazado de regiones de decisión
gs = gridspec.GridSpec(2, 2)
fig = plt.figure(figsize=(10, 8))
for clf, lab, grd in zip([clf1, clf2, clf3, eclf],
['Logistic Regression', 'Random Forest', 'RBF kernel SVM', 'Ensemble'],
itertools.product([0, 1], repeat=2)):
clf.fit(X, y)
ax = plt.subplot(gs[grd[0], grd[1]])
fig = plot_decision_regions(X=X, y=y, clf=clf, legend=2)
plt.title(lab)
plt.show()
```
Si utilizas mlxtend como parte de tu flujo de trabajo en una publicación científica, considera citar el repositorio de mlxtend con el siguiente DOI:
```
@article{raschkas_2018_mlxtend,
author = {Sebastian Raschka},
title = {MLxtend: Providing machine learning and data science
utilities and extensions to Python’s
scientific computing stack},
journal = {The Journal of Open Source Software},
volume = {3},
number = {24},
month = apr,
year = 2018,
publisher = {The Open Journal},
doi = {10.21105/joss.00638},
url = {https://joss.theoj.org/papers/10.21105/joss.00638}
}
```
- Raschka, Sebastian (2018) MLxtend: Providing machine learning and data science utilities and extensions to Python's scientific computing stack.
J Open Source Softw 3(24).
## Licencia
- Este proyecto se publica bajo una licencia de código abierto BSD nueva permisiva ([LICENSE-BSD3.txt](https://github.com/rasbt/mlxtend/blob/master/LICENSE-BSD3.txt)) y es comercialmente utilizable. No hay garantía; ni siquiera de comerciabilidad o idoneidad para un propósito particular.
- Además, puedes usar, copiar, modificar y redistribuir todas las obras creativas artísticas (figuras e imágenes) incluidas en esta distribución bajo el directorio
según los términos y condiciones de la Licencia Internacional Creative Commons Attribution 4.0. Consulta el archivo [LICENSE-CC-BY.txt](https://github.com/rasbt/mlxtend/blob/master/LICENSE-CC-BY.txt) para más detalles. (Los gráficos generados por computadora, como los trazados producidos por matplotlib, se rigen por la licencia BSD mencionada anteriormente).
## Contacto
La mejor manera de hacer preguntas es a través del [canal de GitHub Discussions](https://github.com/rasbt/mlxtend/discussions). En caso de que encuentres errores de uso, no dudes en utilizar directamente el [rastreador de problemas de GitHub](https://github.com/rasbt/mlxtend/issues).
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.