Instructions to use BOUIDA/iris-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use BOUIDA/iris-classifier with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("BOUIDA/iris-classifier", "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,012 Bytes
f751e40 | 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 | ---
library_name: sklearn
tags:
- tabular-classification
- sklearn
- mlops-tp
datasets:
- scikit-learn/iris
metrics:
- accuracy
- f1
---
# Iris classifier (TP MLOps)
Pipeline scikit-learn `StandardScaler` + `LogisticRegression` entraîné sur Iris.
## Résultats (jeu de test, 20% des données)
| Métrique | Valeur |
|----------|--------|
| accuracy | 0.9667 |
| f1_macro | 0.9666 |
## Paramètres
```yaml
# Hyperparamètres et réglages du TP1. On les sort du code pour pouvoir
# les changer sans toucher au script (et plus tard les suivre avec DVC/MLflow).
data:
test_size: 0.2
random_state: 42
model:
C: 1.0
max_iter: 200```
## Utilisation
```python
import joblib
from huggingface_hub import hf_hub_download
path = hf_hub_download("BOUIDA/iris-classifier", "model.joblib")
bundle = joblib.load(path)
idx = bundle["model"].predict([[5.1, 3.5, 1.4, 0.2]])[0]
print(bundle["target_names"][idx]) # setosa
```
Publié le 2026-11-24.
|