Instructions to use BOUIDA/logreg-iris-softmax with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use BOUIDA/logreg-iris-softmax with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("BOUIDA/logreg-iris-softmax", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
File size: 1,467 Bytes
29384b7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | ---
library_name: sklearn
tags:
- tabular-classification
- logistic-regression
- iris
datasets:
- scikit-learn/iris
metrics:
- accuracy
license: mit
---
# Régression logistique multiclasse (softmax) – Iris 🌸
Modèle de classification qui prédit l'espèce d'une fleur d'iris à partir de 4 mesures.
## Description
- **Type :** `Pipeline` scikit-learn = `StandardScaler` + `LogisticRegression` (softmax multiclasse)
- **Données :** dataset Iris (150 fleurs, 3 espèces), 70 % entraînement / 30 % test (stratifié)
- **Classes :** 0 = setosa, 1 = versicolor, 2 = virginica
## Performance
| Méthode | Accuracy (test) |
|---|---|
| **Softmax (ce modèle)** | **0,911** |
| One-vs-Rest (comparaison) | 0,844 |
## Utilisation
```python
from huggingface_hub import hf_hub_download
import joblib
import pandas as pd
chemin = hf_hub_download("BOUIDA/logreg-iris-softmax", "logreg_iris_softmax.joblib")
modele = joblib.load(chemin)
fleur = pd.DataFrame([{
"sepal length (cm)": 6.0, "sepal width (cm)": 2.9,
"petal length (cm)": 4.5, "petal width (cm)": 1.5,
}])
classes = ["setosa", "versicolor", "virginica"]
print(classes[modele.predict(fleur)[0]]) # versicolor
```
⚠️ Le modèle attend un DataFrame avec exactement ces 4 noms de colonnes.
La normalisation (StandardScaler) est incluse dans le modèle.
## Limites
- Entraîné sur un petit dataset (150 exemples) : projet d'apprentissage.
- Ne reconnaît que les 3 espèces d'iris du dataset.
|