Skip to content

Commit

Permalink
remove f1 calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
henicosa committed May 1, 2024
1 parent db891b2 commit fdc437c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions authorship-verification-submission/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,27 @@
"nlpbuw-fsu-sose-24", f"authorship-verification-validation-20240408-training"
)

labels = tira.pd.truths(
"nlpbuw-fsu-sose-24", f"authorship-verification-validation-20240408-training"
)


# Load the model and make predictions
model = load(Path(__file__).parent / "model.joblib")
predictions = model.predict(df["text"])
df["generated"] = predictions
df = df[["id", "generated"]]

# export truth to a json file with indent=4
labels.to_json(
Path(__file__).parent / "truth.json", orient="records", lines=True, indent=4
)

# Save the predictions
output_directory = get_output_directory(str(Path(__file__).parent))
df.to_json(
Path(output_directory) / "predictions.jsonl", orient="records", lines=True
)

"""
labels = tira.pd.truths(
"nlpbuw-fsu-sose-24", f"authorship-verification-validation-20240408-training"
)
# Calculate the F1 score
f1 = f1_score(labels["generated"], predictions)
print(f"F1 score: {f1}")
print(f"F1 score: {f1}")
"""

0 comments on commit fdc437c

Please sign in to comment.