From f648bd58bec24d5c199e8c31d1cb73bb9096d0f0 Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Wed, 1 May 2024 17:07:28 -0500
Subject: [PATCH] snapshot...

---
 modules/machine_learning/classification.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/modules/machine_learning/classification.py b/modules/machine_learning/classification.py
index c588ceb2..79813e32 100644
--- a/modules/machine_learning/classification.py
+++ b/modules/machine_learning/classification.py
@@ -67,12 +67,11 @@ def plot_confusion_matrix(cm, classes,
     plt.xlabel('Predicted label')
 
 
-def get_csv_as_dataframe(csv_file, reduce_frac=None, random_state=42):
+def get_csv_as_dataframe(csv_file, reduce_frac=1.0, random_state=42):
     icing_df = pd.read_csv(csv_file)
 
     # Random selection of reduce_frac of the rows
-    if reduce_frac is not None:
-        icing_df = icing_df.sample(axis=0, frac=reduce_frac, random_state=random_state)
+    icing_df = icing_df.sample(axis=0, frac=reduce_frac, random_state=random_state)
 
     # # remove approximately half of rows where column_name equals to column_value
     # column_name = 'icing_intensity'
-- 
GitLab