Vu Anh commited on
Commit ·
108511c
1
Parent(s): a7b2e06
Add comprehensive model card metadata for Hugging Face
Browse files- Add YAML frontmatter with model metadata
- Include tags, metrics, and model-index
- Add model description and limitations
- Include ethical considerations
- Document training procedure and evaluation
README.md
CHANGED
|
@@ -1,17 +1,51 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
| 4 |
|
| 5 |
# Sonar Core Model
|
| 6 |
|
| 7 |
A simple scikit-learn Random Forest classifier for the Sonar dataset (Rocks vs Mines classification).
|
| 8 |
|
| 9 |
-
## Model
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
- **Algorithm**: Random Forest Classifier
|
| 12 |
- **Preprocessing**: StandardScaler normalization
|
| 13 |
- **Framework**: scikit-learn
|
| 14 |
- **Task**: Binary classification
|
|
|
|
|
|
|
| 15 |
|
| 16 |
## Installation
|
| 17 |
|
|
@@ -65,10 +99,44 @@ model.save("my_model.pkl")
|
|
| 65 |
- `max_depth`: Maximum depth of trees (default: 10)
|
| 66 |
- `random_state`: Random seed for reproducibility (default: 42)
|
| 67 |
|
| 68 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
|
| 70 |
-
|
|
|
|
|
|
|
|
|
|
| 71 |
|
| 72 |
-
##
|
| 73 |
|
| 74 |
-
https://huggingface.co/undertheseanlp/sonar_core_1
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
library_name: scikit-learn
|
| 4 |
+
tags:
|
| 5 |
+
- scikit-learn
|
| 6 |
+
- sklearn
|
| 7 |
+
- classification
|
| 8 |
+
- tabular-classification
|
| 9 |
+
- sonar
|
| 10 |
+
- random-forest
|
| 11 |
+
datasets:
|
| 12 |
+
- sonar
|
| 13 |
+
metrics:
|
| 14 |
+
- accuracy
|
| 15 |
+
model-index:
|
| 16 |
+
- name: sonar-core-1
|
| 17 |
+
results:
|
| 18 |
+
- task:
|
| 19 |
+
type: tabular-classification
|
| 20 |
+
name: Tabular Classification
|
| 21 |
+
dataset:
|
| 22 |
+
name: Sonar Dataset
|
| 23 |
+
type: sonar
|
| 24 |
+
metrics:
|
| 25 |
+
- type: accuracy
|
| 26 |
+
value: 0.86
|
| 27 |
+
name: Test Accuracy
|
| 28 |
+
language:
|
| 29 |
+
- en
|
| 30 |
+
pipeline_tag: tabular-classification
|
| 31 |
---
|
| 32 |
|
| 33 |
# Sonar Core Model
|
| 34 |
|
| 35 |
A simple scikit-learn Random Forest classifier for the Sonar dataset (Rocks vs Mines classification).
|
| 36 |
|
| 37 |
+
## Model Description
|
| 38 |
+
|
| 39 |
+
This is a Random Forest classifier trained for binary classification on sonar signal data. The model distinguishes between sonar signals bounced off metal cylinders (mines) and those bounced off rocks.
|
| 40 |
+
|
| 41 |
+
### Model Architecture
|
| 42 |
|
| 43 |
- **Algorithm**: Random Forest Classifier
|
| 44 |
- **Preprocessing**: StandardScaler normalization
|
| 45 |
- **Framework**: scikit-learn
|
| 46 |
- **Task**: Binary classification
|
| 47 |
+
- **Input**: 60 numeric features (sonar signal frequencies)
|
| 48 |
+
- **Output**: Binary classification (Rock=0, Mine=1)
|
| 49 |
|
| 50 |
## Installation
|
| 51 |
|
|
|
|
| 99 |
- `max_depth`: Maximum depth of trees (default: 10)
|
| 100 |
- `random_state`: Random seed for reproducibility (default: 42)
|
| 101 |
|
| 102 |
+
## Training
|
| 103 |
+
|
| 104 |
+
### Training Data
|
| 105 |
+
|
| 106 |
+
The model is designed for the Sonar dataset which contains:
|
| 107 |
+
- 60 numeric features representing sonar signal frequencies (ranging from 0.0 to 1.0)
|
| 108 |
+
- Binary target: Rock (R) or Mine (M)
|
| 109 |
+
- Balanced classes with approximately 50% distribution
|
| 110 |
+
|
| 111 |
+
### Training Procedure
|
| 112 |
+
|
| 113 |
+
The model was trained using:
|
| 114 |
+
- Train/test split: 80/20
|
| 115 |
+
- Random state: 42 for reproducibility
|
| 116 |
+
- StandardScaler preprocessing for feature normalization
|
| 117 |
+
- Random Forest with 100 trees and max depth of 10
|
| 118 |
+
|
| 119 |
+
### Evaluation
|
| 120 |
+
|
| 121 |
+
**Test Set Performance:**
|
| 122 |
+
- Accuracy: 86.0%
|
| 123 |
+
|
| 124 |
+
## Limitations
|
| 125 |
+
|
| 126 |
+
- The model is trained on synthetic data for demonstration purposes
|
| 127 |
+
- Actual sonar data may have different characteristics
|
| 128 |
+
- Performance may vary on real-world sonar signals
|
| 129 |
+
- Limited to binary classification (rock vs mine)
|
| 130 |
+
|
| 131 |
+
## Ethical Considerations
|
| 132 |
|
| 133 |
+
This model is intended for educational and research purposes. When deploying for real-world applications:
|
| 134 |
+
- Consider the consequences of false positives/negatives in mine detection
|
| 135 |
+
- Ensure proper validation with actual sonar data
|
| 136 |
+
- Use as part of a broader decision-making system, not as the sole detector
|
| 137 |
|
| 138 |
+
## Additional Information
|
| 139 |
|
| 140 |
+
- **Repository**: https://huggingface.co/undertheseanlp/sonar_core_1
|
| 141 |
+
- **Framework Version**: scikit-learn 1.7.2
|
| 142 |
+
- **Python Version**: 3.10+
|