From ab18fb25c2355ba3f281a32af860633ea0ee954e Mon Sep 17 00:00:00 2001 From: jcollopy-tulane Date: Sat, 27 Apr 2024 19:42:59 -0500 Subject: [PATCH] Switching --- nlp/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nlp/cli.py b/nlp/cli.py index ce33cc4..8c3c0762 100644 --- a/nlp/cli.py +++ b/nlp/cli.py @@ -102,7 +102,7 @@ def process_text(document): X = vec_1.fit_transform(train_df["Comment"]) y = train_df["Result_Bin"] bnb.fit(X,y) - y_pred = lr.predict(val_df["Stemmed"]) + y_pred = nb.predict(val_df["Stemmed"]) y_val = val_df["Result_Bin"] # Calculate F1 f1 = f1_score(y_val, y_pred) @@ -141,7 +141,7 @@ def process_text(document): X = vec_2.fit_transform(train_df["Comment"]) y = train_df["Result_Bin"] lr.fit(X,y) - y_pred = BNB.predict(val_df["Stemmed"]) + y_pred = lr.predict(val_df["Stemmed"]) y_val = val_df["Result_Bin"] # Calculate F1 f1 = f1_score(y_val, y_pred)