Instructions to use Fatineknidla/iris-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use Fatineknidla/iris-classifier with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("Fatineknidla/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
๐ธ Iris Flower Classifier
A simple Random Forest classifier trained on the classic Iris dataset.
Model Details
| Property | Value |
|---|---|
| Algorithm | Random Forest |
| n_estimators | 100 |
| Test Accuracy | 0.9000 |
| Train samples | 120 |
| Test samples | 30 |
Classes
The model predicts one of three Iris species:
setosaversicolorvirginica
Usage
import pickle, numpy as np
with open("model.pkl", "rb") as f: model = pickle.load(f)
with open("scaler.pkl", "rb") as f: scaler = pickle.load(f)
# sepal length, sepal width, petal length, petal width (all in cm)
X = np.array([[5.1, 3.5, 1.4, 0.2]])
X_scaled = scaler.transform(X)
prediction = model.predict(X_scaled)
print(prediction) # e.g. [0] โ setosa
Per-class Metrics
| Class | Precision | Recall | F1-score |
|---|---|---|---|
| setosa | 1.0000 | 1.0000 | 1.0000 |
| versicolor | 0.8182 | 0.9000 | 0.8571 |
| virginica | 0.8889 | 0.8000 | 0.8421 |
- Downloads last month
- -
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("Fatineknidla/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