From ba6133548beb092a60da3c93395bbde72b6dca8b Mon Sep 17 00:00:00 2001 From: Thomas Wood Date: Wed, 7 Feb 2024 22:07:51 +0000 Subject: [PATCH] Update kaggle.md --- content/en/blog/kaggle.md | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/content/en/blog/kaggle.md b/content/en/blog/kaggle.md index d09504aa..4a2f7940 100644 --- a/content/en/blog/kaggle.md +++ b/content/en/blog/kaggle.md @@ -38,9 +38,29 @@ kaggle competitions download -c harmony-pdf-and-word-questionnaires-extract unzip harmony-pdf-and-word-questionnaires-extract.zip ``` -5. Run [create_sample_submission.py](https://github.com/harmonydata/pdf-questionnaire-extraction/blob/main/data/create_sample_submission.py) in the folder containing your data. It will create a CSV file `submission.csv`. +5. Run [create_sample_submission.py](https://github.com/harmonydata/pdf-questionnaire-extraction/blob/main/data/create_sample_submission.py) in the folder containing your data to create your train and test predictions: -6. Submit your CSV file to Kaggle +To generate predictions for the training data and write to train_predictions.csv: + +``` +python create_sample_submission.py train +``` + +To evaluate the train predictions: + +``` +python evaluate_train_results.py +``` + +6. To modify the prediction logic or inject your own model, you can edit the function `dummy_extract_questions`. + +7. To generate predictions for the test data and write to submission.csv: + +``` +python create_sample_submission.py test +``` + +8. Submit your CSV file to Kaggle ``` kaggle competitions submit -c harmony-pdf-and-word-questionnaires-extract -f submission.csv -m "Message"