Perbandingan 7 algoritma machine learning pada PIMA Indians Diabetes Dataset dengan evaluasi akurasi, precision, recall, F1-score, dan hyperparameter tuning.
| # | Nama Fitur | Deskripsi | Tipe | Peran |
|---|---|---|---|---|
| 1 | Pregnancies | Jumlah kehamilan | Numerik | Input |
| 2 | Glucose | Kadar glukosa darah (mg/dL) | Numerik | Input |
| 3 | BloodPressure | Tekanan darah diastolik (mmHg) | Numerik | Input |
| 4 | SkinThickness | Ketebalan lipatan kulit trisep (mm) | Numerik | Input |
| 5 | Insulin | Kadar insulin serum 2 jam (mu U/ml) | Numerik | Input |
| 6 | BMI | Indeks massa tubuh (kg/mยฒ) | Numerik | Input |
| 7 | DiabetesPedigreeFunction | Fungsi riwayat diabetes keluarga | Numerik | Input |
| 8 | Age | Usia (tahun) | Numerik | Input |
| 9 | Outcome | Hasil diagnosa (0=Tidak, 1=Diabetes) | Binary | Target |
Split data: 80% training (614) / 20% testing (154) ยท Normalisasi: StandardScaler ยท Cross Validation: 10-fold StratifiedKFold
| Algoritma | Accuracy | Precision | Recall | F1-Score | Bar Akurasi |
|---|---|---|---|---|---|
| Logistic Regression | 70.78% | 60.00% | 50.00% | 54.55% | |
| Decision Tree | 66.88% | 53.33% | 44.44% | 48.48% | |
| ๐ Random Forest | 75.97% | 68.09% | 59.26% | 63.37% | |
| ๐ Gradient Boosting | 75.97% | 68.09% | 59.26% | 63.37% | |
| SVM | 73.38% | 64.44% | 53.70% | 58.59% | |
| KNN | 70.78% | 59.57% | 51.85% | 55.45% | |
| Naive Bayes | 69.48% | 55.93% | 61.11% | 58.41% |
CV 10-fold: 75.90% ยฑ 3.75%
n_estimators : 300 max_depth : 15 min_samples_split: 5 min_samples_leaf : 2 random_state : 42 Metode: GridSearchCV CV : StratifiedKFold (5-fold) Scoring: accuracy