Instructions to use kalifi/iris-species-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use kalifi/iris-species-classifier with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("kalifi/iris-species-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
| language: en | |
| tags: | |
| - sklearn | |
| - tabular-classification | |
| - mlflow | |
| license: apache-2.0 | |
| # Iris Species Classifier | |
| A lightweight logistic regression model trained on the classic Iris dataset. | |
| Classifies flower measurements into three species: Setosa, Versicolor, Virginica. | |
| ## Usage | |
| ```python | |
| import mlflow.pyfunc | |
| import pandas as pd | |
| model = mlflow.pyfunc.load_model("kalifi/iris-species-classifier") | |
| sample = pd.DataFrame( | |
| [[5.1, 3.5, 1.4, 0.2]], | |
| columns=["sepal_length", "sepal_width", "petal_length", "petal_width"] | |
| ) | |
| print(model.predict(sample)) # ['setosa'] | |
| ``` | |
| ## Performance | |
| - Accuracy: 97.3% on held-out test set | |
| - Training data: UCI Iris Dataset (150 samples) | |
| - Framework: scikit-learn LogisticRegression + StandardScaler pipeline | |