Skip to content

Commit

Permalink
completed Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
MarekB19 committed Dec 16, 2024
1 parent 2331e2a commit 189b139
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 19 deletions.
38 changes: 19 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ data/raw/pretransformed_heart_disease.csv: scripts/1_download_decode_data.py
data/processed/train_df.csv data/processed/test_df.csv: scripts/2_data_split_validate.py \
data/raw/pretransformed_heart_disease.csv
python scripts/2_data_split_validate.py \
--split=0.1 \
--split=0.2 \
--raw-data=data/raw/pretransformed_heart_disease.csv \
--write-to=data/processed

Expand Down Expand Up @@ -64,27 +64,27 @@ results/figures/correlation_matrix.png \
results/tables/cross_val_score.csv \
results/figures/confusion_matrix.png \
results/tables/model_metrics.csv
quarto render report/adult_income_predictor_report.qmd --to html
quarto render report/adult_income_predictor_report.qmd --to pdf
quarto render reports/heart_diagnostic_analysis.qmd --to html
quarto render reports/heart_diagnostic_analysis.qmd --to pdf

# clean up analysis / nuke everything

# clean up analysis
clean :
rm -rf data/raw/*
# added this. confirm we do want to delete processed data as well :)
rm -rf data/processed/*
rm -rf results/figures/categorical_distributions.png \
results/figures/confusion_matrix.png \
results/figures/correlation_matrix.png \
results/figures/numeric_distributions.png
rm -rf results/models/disease_pipeline.pickle
rm -rf results/tables/correlation_matrix.csv \
results/tables/cross_val_score.csv \
results/tables/cross_val_std.csv \
results/tables/high_correlations.csv \
results/tables/model_metrics.csv \
rm -rf report/heart_diagnostic_analysis_files.html \
report/heart_diagnostic_analysis.pdf \
report/heart_diagnostic_analysis
rm -rf data/processed/*
rm -rf results/figures/categorical_distributions.png \
results/figures/confusion_matrix.png \
results/figures/correlation_matrix.png \
results/figures/numeric_distributions.png
rm -rf results/models/disease_pipeline.pickle
rm -rf results/tables/correlation_matrix.csv \
results/tables/cross_val_score.csv \
results/tables/cross_val_std.csv \
results/tables/high_correlations.csv \
results/tables/model_metrics.csv \
rm -rf reports/heart_diagnostic_analysis_files.html \
reports/heart_diagnostic_analysis.pdf \
reports/heart_diagnostic_analysis



16 changes: 16 additions & 0 deletions test/test_model_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,22 @@
#Create dummy model

#create dummy X_train, y_train, X_test, y_test data
valid_data = pd.DataFrame({
"Age (in years)": [63, 37, 41],
"Sex": ["male", "female", "female"],
"Chest pain type": ["typical angina", "non-anginal pain", "atypical angina"],
"Resting blood pressure (in mm Hg on admission to the hospital)": [145, 130, 130],
"Serum cholesterol (in mg/dl)": [233, 250, 204],
"Fasting blood sugar > 120 mg/dl": [True, False, False],
"Resting electrocardiographic results": ["normal", "having ST-T wave abnormality", "normal"],
"Maximum heart rate achieved": [150, 187, 172],
"Exercise-induced angina": ["no", "no", "yes"],
"ST depression induced by exercise relative to rest": [2.3, 3.5, 1.4],
"Slope of the peak exercise ST segment": ["downsloping", "flat", "upsloping"],
"Number of major vessels (0–3) colored by fluoroscopy": [0.0, 0.0, 0.0],
"Thalassemia": ["fixed defect", "reversible defect", "normal"],
"Diagnosis of heart disease": ["< 50% diameter narrowing", "< 50% diameter narrowing", "> 50% diameter narrowing"]
})



Expand Down

0 comments on commit 189b139

Please sign in to comment.