--- license: mit tags: - sklearn - classification - iris - random-forest - tabular library_name: sklearn --- # 🌸 Iris Classifier — Random Forest A simple **Random Forest** classifier trained on the classic [Iris dataset](https://scikit-learn.org/stable/auto_examples/datasets/plot_iris_dataset.html). 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 ```python 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*