-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #125 from UBC-MDS/develop
Final Repo
- Loading branch information
Showing
44 changed files
with
906 additions
and
1,996 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ on: | |
paths: | ||
- 'Dockerfile' | ||
- 'conda-linux-64.lock' | ||
- 'requirements.txt' | ||
|
||
jobs: | ||
push_to_registry: | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- | ||
editor_options: | ||
markdown: | ||
wrap: 72 | ||
--- | ||
|
||
Revisions: | ||
|
||
Who: Merari Santana | ||
|
||
What was addressed: | ||
|
||
- Scripts on README file were not running Description of Revision: I | ||
revised the instructions for running Make file. This runs all the | ||
scripts correctly. Evidence: | ||
<https://github.com/UBC-MDS/heart-failure-analysis/commit/3f23b4e431508388575169556cc8aa3a8e0a0646> | ||
|
||
- Improved accessibility to our report Description of Revision: I | ||
deployed Github pages so that our README file has a direct link to | ||
our HTML report. Evidence: | ||
<https://github.com/UBC-MDS/heart-failure-analysis/commit/7e22dd6dc250c11948aa87be384a8f9c15fec87a> | ||
|
||
- Change acronymns in final report and delete bullet points | ||
Description of Revision: I changed the acronyms in our qmd file and | ||
deleted bullet points. These changes were rendered to our pdf and | ||
html files. Evidence: | ||
<https://github.com/UBC-MDS/heart-failure-analysis/commit/b91ca5a3874067d447d9646090028011784b85ba> | ||
<https://github.com/UBC-MDS/heart-failure-analysis/commit/7a12b5c145fc4dc222c043461186f4d0b4b43c99> | ||
|
||
Who: Gurmehak Kaur | ||
|
||
What was addressed: | ||
|
||
- Improve the project folder structure Description of Revision: I cleaned up and improved the project’s folder structure by organizing files into dedicated folders that were earlier missing in our repo: `reports/` for generated summaries, `results/` with subfolders for tables and figures for visualizations, `scripts/` for executable workflows and `src/` for abstract functions. This streamlined structure improves clarity and project maintainability. | ||
Evidence: | ||
<https://github.com/UBC-MDS/heart-failure-analysis/commit/87eadd9b89b44e0c49dea8433a9b300577dab760> | ||
<https://github.com/UBC-MDS/heart-failure-analysis/commit/5517cf4a60afb6bf6afef3c43c2f820a9909862c> | ||
|
||
Who: Ke Gao | ||
|
||
What was addressed: | ||
|
||
- Improve Automatic Numbering of Figures in the Report Description of | ||
Revision: I improved automatic numbering of figures in the report. | ||
Evidence: | ||
<https://github.com/UBC-MDS/heart-failure-analysis/pull/106> | ||
|
||
- Improve Automatic Numbering of Tables in the Report Description of | ||
Revision: I improved automatic numbering of tables in the report. | ||
Evidence: | ||
<https://github.com/UBC-MDS/heart-failure-analysis/pull/106> | ||
|
||
Who: Yuhan Fan | ||
|
||
What was addressed: | ||
|
||
- Updated README.me with following: | ||
|
||
- the 'About' section of README.md with most resent results | ||
metrics from our final report, and fixed any grammar errors. | ||
|
||
- Deleted bullet point and capitalized "contributors" in | ||
README.md. | ||
|
||
- Added GitHub repository link under 'Usage' - 'Setup' section. | ||
|
||
- Added example screenshot image to 'Running the analysis' | ||
section. | ||
|
||
- Evidence: | ||
<https://github.com/UBC-MDS/heart-failure-analysis/pull/120> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,73 @@ | ||
.PHONY: all clean | ||
|
||
all: report/heart_failure_analysis.html report/heart_failure_analysis.pdf | ||
all: data/raw/heart_failure_clinical_records.data \ | ||
data/processed/heart_failure_train.csv \ | ||
results/figures/correlation_heatmap.png \ | ||
results/models/pipeline.pickle results/figures/training_plots \ | ||
results/tables/confusion_matrix.csv \ | ||
results/tables/test_scores.csv \ | ||
reports/heart-failure-analysis.html \ | ||
reports/heart-failure-analysis.pdf | ||
|
||
# Download and convert data | ||
data/raw/heart_failure_clinical_records.data : scripts/download_and_convert.py | ||
data/raw/heart_failure_clinical_records.data: scripts/download_and_convert.py | ||
python scripts/download_and_convert.py \ | ||
--url="https://archive.ics.uci.edu/static/public/519/heart+failure+clinical+records.zip" \ | ||
--write_to=data/raw | ||
|
||
# Process and analyze data | ||
data/processed/heart_failure_train.csv data/processed/heart_failure_test.csv : scripts/process_and_analyze.py data/raw/heart_failure_clinical_records.data | ||
python scripts/process_and_analyze.py \ | ||
--file_path=data/raw/heart_failure_clinical_records.data \ | ||
--data-to=data/processed | ||
--file_path="data/raw/heart_failure_clinical_records_dataset_converted.csv" \ | ||
--output_dir=data/processed | ||
|
||
# Perform correlation analysis | ||
results/figures/correlation_heatmap.png : scripts/correlation_analysis.py data/processed/heart_failure_train.csv data/processed/heart_failure_test.csv | ||
python scripts/correlation_analysis.py \ | ||
--train_file=data/processed/heart_failure_train.csv \ | ||
--test_file=data/processed/heart_failure_test.csv \ | ||
--output_file=results/figures/correlation_heatmap.png | ||
--output_file="./results/figures/heatmap.png" | ||
|
||
# Train and evaluate the model | ||
results/models/pipeline.pickle results/figures/training_plots : scripts/modelling.py data/processed/heart_failure_train.csv | ||
python scripts/modelling.py \ | ||
--training-data=data/processed/heart_failure_train.csv \ | ||
--pipeline-to=results/models \ | ||
--plot-to=results/figures \ | ||
--seed=123 | ||
|
||
results/tables/test_evaluation.csv : scripts/model_evaluation.py data/processed/heart_failure_test.csv results/models/pipeline.pickle | ||
results/models/pipeline.pickle results/figures/training_plots: data/processed/heart_failure_train.csv | ||
python scripts/modelling.py \ | ||
--training-data "./data/processed/heart_failure_train.csv" \ | ||
--pipeline-to "results/models" \ | ||
--plot-to "results/figures" \ | ||
--table-to "results/tables" \ | ||
--seed 123 | ||
|
||
results/tables/confusion_matrix.csv results/tables/test_scores.csv: scripts/model_evaluation.py data/processed/heart_failure_test.csv results/models/pipeline.pickle | ||
python scripts/model_evaluation.py \ | ||
--scaled-test-data=data/processed/heart_failure_test.csv \ | ||
--pipeline-from=results/models/pipeline.pickle \ | ||
--results-to=results/tables | ||
--scaled-test-data "data/processed/heart_failure_test.csv" \ | ||
--pipeline-from "results/models/pipeline.pickle" \ | ||
--results-to "results/tables" | ||
|
||
# Build HTML and PDF reports | ||
report/heart_failure_analysis.html report/heart_failure_analysis.pdf : report/heart_failure_analysis.qmd \ | ||
results/models/pipeline.pickle \ | ||
results/figures/heatmap.html \ | ||
results/figures/training_plots \ | ||
results/tables/test_evaluation.csv | ||
quarto render report/heart_failure_analysis.qmd --to html | ||
quarto render report/heart_failure_analysis.qmd --to pdf | ||
# Rule to generate HTML | ||
reports/heart-failure-analysis.html: | ||
quarto render reports/heart-failure-analysis.qmd --to html --embed-resources --standalone | ||
|
||
# Rule to generate PDF | ||
reports/heart-failure-analysis.pdf: | ||
quarto render reports/heart-failure-analysis.qmd --to pdf | ||
|
||
|
||
# Clean up analysis | ||
clean: | ||
rm -rf data/raw/* | ||
rm -f results/data/processed/heart_failure_train.csv \ | ||
results/data/processed/heart_failure_test.csv \ | ||
results/models/pipeline.pickle \ | ||
results/figures/heatmap.html \ | ||
results/figures/training_plots \ | ||
results/tables/test_evaluation.csv \ | ||
report/heart_failure_analysis.html \ | ||
report/heart_failure_analysis.pdf | ||
rm -rf \ | ||
data/processed/* \ | ||
results/figures/* \ | ||
results/img/* \ | ||
results/models/* \ | ||
results/pipeline/* \ | ||
|
||
rm -f \ | ||
results/tables/test_scores.csv \ | ||
results/tables/confusion_matrix.csv \ | ||
results/tables/confusion_matrix.csv \ | ||
results/tables/logistic_regression_coefficients.csv \ | ||
reports/heart-failure-analysis.html \ | ||
reports/heart-failure-analysis.pdf | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.