Skip to content

Commit

Permalink
Switching
Browse files Browse the repository at this point in the history
  • Loading branch information
jcollopy-tulane committed Apr 28, 2024
1 parent 5e62810 commit ab18fb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nlp/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit ab18fb2

Please sign in to comment.