Instructions to use mosesalphonse/iris-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use mosesalphonse/iris-classifier with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("mosesalphonse/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
| license: mit | |
| library_name: sklearn | |
| tags: | |
| - sklearn | |
| - random-forest | |
| - iris | |
| - classification | |
| # Iris Classifier | |
| A simple Random Forest classifier trained on the classic Iris dataset. | |
| ## Model details | |
| - **Algorithm**: Random Forest (100 trees) | |
| - **Library**: scikit-learn | |
| - **Dataset**: Iris (150 samples, 4 features, 3 classes) | |
| - **Test accuracy**: 1.00 | |
| ## Input | |
| 4 numeric features: | |
| 1. Sepal length (cm) | |
| 2. Sepal width (cm) | |
| 3. Petal length (cm) | |
| 4. Petal width (cm) | |
| ## Output | |
| Predicted species class: `0` (setosa), `1` (versicolor), or `2` (virginica) | |
| ## Usage | |
| ```python | |
| import skops.io as sio | |
| from huggingface_hub import hf_hub_download | |
| path = hf_hub_download(repo_id="mosesalphonse/iris-classifier", filename="model.skops") | |
| model = sio.load(path, trusted=True) | |
| prediction = model.predict([[5.1, 3.5, 1.4, 0.2]]) | |
| print(prediction) | |
| ``` | |