LightGBM tuning

This commit is contained in:
2025-12-06 00:14:59 +01:00
parent ad01d6a3db
commit 42091d6f24
14 changed files with 1539 additions and 1784 deletions

View File

@@ -42,13 +42,8 @@ def train_model_with_kfold(
if smote:
if smote_method.lower() == "kmeans":
from collections import Counter
minority = Counter(y_train)[1]
k_neighbors = min(10, max(2, minority // 10))
sampler = KMeansSMOTE(
k_neighbors=k_neighbors,
k_neighbors=15,
cluster_balance_threshold=0.1,
random_state=random_state,
)