Jeroneo commited on
Commit
8d50e88
·
verified ·
1 Parent(s): a6c095a

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +66 -0
README.md ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ tags:
4
+ - sklearn
5
+ - classification
6
+ - iris
7
+ - random-forest
8
+ - tabular
9
+ library_name: sklearn
10
+ ---
11
+
12
+ # 🌸 Iris Classifier — Random Forest
13
+
14
+ A simple **Random Forest** classifier trained on the classic
15
+ [Iris dataset](https://scikit-learn.org/stable/auto_examples/datasets/plot_iris_dataset.html).
16
+ Deployed automatically via GitHub Actions.
17
+
18
+ ## 📊 Evaluation Results
19
+
20
+ | Metric | Value |
21
+ |---|---|
22
+ | Test Accuracy | **0.9333** |
23
+ | CV Accuracy (5-fold) | **0.9667 ± 0.0211** |
24
+ | Train samples | 120 |
25
+ | Test samples | 30 |
26
+
27
+ ## 🏗️ Model Details
28
+
29
+ | Parameter | Value |
30
+ |---|---|
31
+ | Algorithm | Random Forest |
32
+ | n_estimators | 100 |
33
+ | max_depth | 5 |
34
+
35
+ ## 📥 Usage
36
+
37
+ ```python
38
+ import pickle, requests, numpy as np
39
+ from huggingface_hub import hf_hub_download
40
+
41
+ # Download model
42
+ model_path = hf_hub_download(repo_id="YOUR_HF_USERNAME/iris-classifier", filename="iris_classifier.pkl")
43
+ with open(model_path, "rb") as f:
44
+ model = pickle.load(f)
45
+
46
+ # Predict (sepal length, sepal width, petal length, petal width)
47
+ sample = np.array([[5.1, 3.5, 1.4, 0.2]])
48
+ prediction = model.predict(sample)
49
+ class_names = ['setosa', 'versicolor', 'virginica']
50
+ print(class_names[prediction[0]]) # -> 'setosa'
51
+ ```
52
+
53
+ ## 📋 Features
54
+
55
+ The model uses 4 features:
56
+ - `sepal length (cm)`
57
+ - `sepal width (cm)`
58
+ - `petal length (cm)`
59
+ - `petal width (cm)`
60
+
61
+ ## 🏷️ Classes
62
+
63
+ `setosa`, `versicolor`, `virginica`
64
+
65
+ ---
66
+ *Last trained: 2026-03-10*