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
File size: 856 Bytes
391c660 | 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 | ---
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)
```
|