🌸 Iris Classifier — Random Forest
A simple Random Forest classifier trained on the classic Iris dataset. Deployed automatically via GitHub Actions.
📊 Evaluation Results
| Metric | Value |
|---|---|
| Test Accuracy | 0.9333 |
| CV Accuracy (5-fold) | 0.9667 ± 0.0211 |
| Train samples | 120 |
| Test samples | 30 |
🏗️ Model Details
| Parameter | Value |
|---|---|
| Algorithm | Random Forest |
| n_estimators | 100 |
| max_depth | 5 |
📥 Usage
import pickle, requests, numpy as np
from huggingface_hub import hf_hub_download
# Download model
model_path = hf_hub_download(repo_id="YOUR_HF_USERNAME/iris-classifier", filename="iris_classifier.pkl")
with open(model_path, "rb") as f:
model = pickle.load(f)
# Predict (sepal length, sepal width, petal length, petal width)
sample = np.array([[5.1, 3.5, 1.4, 0.2]])
prediction = model.predict(sample)
class_names = ['setosa', 'versicolor', 'virginica']
print(class_names[prediction[0]]) # -> 'setosa'
📋 Features
The model uses 4 features:
sepal length (cm)sepal width (cm)petal length (cm)petal width (cm)
🏷️ Classes
setosa, versicolor, virginica
Last trained: 2026-03-10
- Downloads last month
- -
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support