feat: enhance logging and memory management across modules

This commit is contained in:
2025-08-13 23:09:05 +02:00
parent 47e52d130c
commit 9601c5e44d
48 changed files with 1004 additions and 773 deletions
+8 -2
View File
@@ -59,7 +59,9 @@ class NeuralNetworkModel(BaseModel):
)
# Train the neural network
logging.info(f"Fitting model with {X_prepared.shape[0]} samples and {X_prepared.shape[1]} features")
logging.info(
f"Fitting model with {X_prepared.shape[0]} samples and {X_prepared.shape[1]} features"
)
history = self.model.fit(
X_prepared,
y_encoded,
@@ -162,7 +164,11 @@ class NeuralNetworkModel(BaseModel):
# Split data once for validation
X_train_full, X_val, y_train_full, y_val = train_test_split(
X_prepared, y_encoded, test_size=0.2, random_state=self.config.random_seed, stratify=y_encoded
X_prepared,
y_encoded,
test_size=0.2,
random_state=self.config.random_seed,
stratify=y_encoded,
)
for size in train_sizes: