Views
No views yet
| Parametre | Değer |
|---|---|
| Algoritma | XGBoost |
| n_estimators | 300 |
| learning_rate | 0.05 |
| max_depth | 5 |
| scale_pos_weight | 2 (sınıf dengesi) |
| Ön işleme | MinMaxScaler |
| Dosya | Açıklama |
|---|---|
xgboost_model.pkl | Eğitilmiş XGBoost modeli (joblib) |
scaler.pkl | Fit edilmiş MinMaxScaler (joblib) |
feature_names.json | Giriş özelliklerinin sıralı listesi |
Hip, BMI, Avg. F size (R))II beta-HCG sütunundaki bozuk değerler (1.99. gibi) train median'ıyla doldurulduNotebook çıktılarından elde edilen değerleri buraya ekle:
Accuracy : ~0.XX
Precision: ~0.XX (PCOS sınıfı)
Recall : ~0.XX (PCOS sınıfı)
F1-Score : ~0.XX (PCOS sınıfı)1import joblib, json, numpy as np
2from huggingface_hub import hf_hub_download
3
4REPO = "KubraParmak/pcos-xgboost-model"
5model = joblib.load(hf_hub_download(REPO, "xgboost_model.pkl"))
6scaler = joblib.load(hf_hub_download(REPO, "scaler.pkl"))
7with open(hf_hub_download(REPO, "feature_names.json")) as f:
8 features = json.load(f)
9
10# Örnek tahmin (özellik sırası feature_names.json ile aynı olmalı)
11X = np.array([[25, 65, 162, 75, 16, 13, 1, 5, ...]])
12X_scaled = scaler.transform(X)
13pred = model.predict(X_scaled) # 0: Sağlıklı, 1: PCOS
14prob = model.predict_proba(X_scaled) # [P(sağlıklı), P(PCOS)]