From 4650dafb6451a20418e387998335d8464dc499a0 Mon Sep 17 00:00:00 2001 From: Florian Cafiero Date: Sat, 17 Feb 2024 13:00:57 +0100 Subject: [PATCH] Update svm.py - indentation Minor: indentation problem solved on l.97 --- superstyl/svm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superstyl/svm.py b/superstyl/svm.py index 6dc0a76d..5a079c3c 100755 --- a/superstyl/svm.py +++ b/superstyl/svm.py @@ -94,7 +94,7 @@ def train_svm(train, test, cross_validate=None, k=10, dim_reduc=None, norms=True min_class_size = min(Counter(classes).values()) n_neighbors = min(5, min_class_size - 1) # Default n_neighbors in SMOTE is 5 # In case we have to temper with the n_neighbors, we print a warning message to the user (might be written more clearly, but we want a short message, right?) - if n_neighbors >= min_class_size: + if n_neighbors >= min_class_size: print(f"Warning: Adjusting n_neighbors for SMOTE / SMOTETomek to {n_neighbors} due to small class size.") if balance == 'SMOTE': estimators.append(('sampling', over.SMOTE(n_neighbors=n_neighbors, random_state=42)))