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
|
Download README.md from BOUIDA/logreg-iris-softmax: direct link, hf CLI and curl.
- Browser
- Download file 1.47 kB
-
https://huggingface.co/BOUIDA/logreg-iris-softmax/resolve/main/README.md
- Command line
-
hf download hf://BOUIDA/logreg-iris-softmax/README.md
-
curl -L -o README.md https://huggingface.co/BOUIDA/logreg-iris-softmax/resolve/main/README.md
1.47 kB
| 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. | |