Skip to content

Commit d8e0dac

Browse files
REFACTOR: Updating the output messages from pca.py
1 parent 7089f48 commit d8e0dac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pca.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,12 +283,12 @@ def print_pca_results(results):
283283

284284
print(f"\n{BackgroundColors.BOLD}{BackgroundColors.GREEN}PCA Results (n_components={results['n_components']}):{Style.RESET_ALL}")
285285
print(f" {BackgroundColors.GREEN}Explained Variance Ratio: {BackgroundColors.CYAN}{results['explained_variance']:.4f} ({results['explained_variance']*100:.2f}%){Style.RESET_ALL}")
286-
print(f"\n {BackgroundColors.BOLD}10-Fold Cross-Validation Metrics (Training Set):{Style.RESET_ALL}")
286+
print(f"\n {BackgroundColors.BOLD}{BackgroundColors.GREEN}10-Fold Cross-Validation Metrics (Training Set):{Style.RESET_ALL}")
287287
print(f" {BackgroundColors.GREEN}CV Accuracy: {BackgroundColors.CYAN}{results['cv_accuracy']:.4f}{Style.RESET_ALL}")
288288
print(f" {BackgroundColors.GREEN}CV Precision: {BackgroundColors.CYAN}{results['cv_precision']:.4f}{Style.RESET_ALL}")
289289
print(f" {BackgroundColors.GREEN}CV Recall: {BackgroundColors.CYAN}{results['cv_recall']:.4f}{Style.RESET_ALL}")
290290
print(f" {BackgroundColors.GREEN}CV F1-Score: {BackgroundColors.CYAN}{results['cv_f1_score']:.4f}{Style.RESET_ALL}")
291-
print(f"\n {BackgroundColors.BOLD}Test Set Metrics:{Style.RESET_ALL}")
291+
print(f"\n {BackgroundColors.BOLD}{BackgroundColors.GREEN}Test Set Metrics:{Style.RESET_ALL}")
292292
print(f" {BackgroundColors.GREEN}Test Accuracy: {BackgroundColors.CYAN}{results['test_accuracy']:.4f}{Style.RESET_ALL}")
293293
print(f" {BackgroundColors.GREEN}Test Precision: {BackgroundColors.CYAN}{results['test_precision']:.4f}{Style.RESET_ALL}")
294294
print(f" {BackgroundColors.GREEN}Test Recall: {BackgroundColors.CYAN}{results['test_recall']:.4f}{Style.RESET_ALL}")

0 commit comments

Comments
 (0)