Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a CHANGELOG.md to track all project improvements, bug fixes, and feature additions #92

Merged
merged 4 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
252 changes: 252 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,11 @@ If you prefer a containerized environment, use our pre-built Docker image that i

#### Steps

1. Go to the root of this project in the terminal and then run:
```bash
docker compose up
```
1. **Run the Docker Container**
Go to the root of this project in the terminal and then run:
```bash
docker compose up
```
2. **Run the Analysis (Make Targets)**
- To start fresh (remove previously generated files):
```bash
Expand Down Expand Up @@ -169,6 +170,16 @@ If you prefer not to use `make`, you can manually run each step after setting up

---

## Run the Tests

After ensuring that you are in the project root directory, you can run the tests in the terminal with the following command:
```bash
pytest
```
This will execute all the test scripts located in the `tests/` directory within the Docker container.

---

## Updating Dependencies and Docker Image

1. **Add/Update Dependencies**
Expand Down

Large diffs are not rendered by default.

35 changes: 18 additions & 17 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ <h3 data-number="4.0.1" class="anchored"><span class="header-section-number">4.0
<div id="fig-numeric-distributions" class="quarto-float quarto-figure quarto-figure-center anchored">
<figure class="quarto-float quarto-float-fig figure">
<div aria-describedby="fig-numeric-distributions-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<img src="results/figures/raw_feature_distributions.png" class="img-fluid figure-img"
<img src="results/figures/eda_output_raw_feature_distributions.png" class="img-fluid figure-img"
style="width:70.0%">
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig"
Expand All @@ -348,7 +348,7 @@ <h3 data-number="4.0.1" class="anchored"><span class="header-section-number">4.0
<div id="fig-target-distribution" class="quarto-float quarto-figure quarto-figure-center anchored">
<figure class="quarto-float quarto-float-fig figure">
<div aria-describedby="fig-target-distribution-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<img src="results/figures/target_variable_distribution.png" class="img-fluid figure-img"
<img src="results/figures/eda_output_target_distribution.png" class="img-fluid figure-img"
style="width:75.0%">
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig"
Expand All @@ -363,7 +363,7 @@ <h3 data-number="4.0.1" class="anchored"><span class="header-section-number">4.0
<div id="fig-categorical-distributions" class="quarto-float quarto-figure quarto-figure-center anchored">
<figure class="quarto-float quarto-float-fig figure">
<div aria-describedby="fig-categorical-distributions-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<img src="results/figures/categorical_features_distribution.png" class="img-fluid figure-img"
<img src="results/figures/eda_output_categorical_stacked_barplots.png" class="img-fluid figure-img"
style="width:70.0%">
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig"
Expand All @@ -378,7 +378,8 @@ <h3 data-number="4.0.1" class="anchored"><span class="header-section-number">4.0
<div id="fig-boxplots-class" class="quarto-float quarto-figure quarto-figure-center anchored">
<figure class="quarto-float quarto-float-fig figure">
<div aria-describedby="fig-boxplots-class-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<img src="results/figures/raw_boxplots_by_class.png" class="img-fluid figure-img" style="width:75.0%">
<img src="results/figures/eda_output_numeric_boxplots.png" class="img-fluid figure-img"
style="width:75.0%">
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig"
id="fig-boxplots-class-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Expand Down Expand Up @@ -429,29 +430,29 @@ <h2 data-number="4.1" class="anchored" data-anchor-id="discussion"><span
<tbody>
<tr class="odd">
<td style="text-align: left;">Dummy</td>
<td style="text-align: left;">0.009 (+/- 0.003)</td>
<td style="text-align: left;">0.005 (+/- 0.003)</td>
<td style="text-align: left;">0.009 (+/- 0.002)</td>
<td style="text-align: left;">0.004 (+/- 0.001)</td>
<td style="text-align: left;">0.543 (+/- 0.007)</td>
<td style="text-align: left;">0.542 (+/- 0.002)</td>
</tr>
<tr class="even">
<td style="text-align: left;">Decision tree</td>
<td style="text-align: left;">0.011 (+/- 0.003)</td>
<td style="text-align: left;">0.003 (+/- 0.004)</td>
<td style="text-align: left;">0.009 (+/- 0.000)</td>
<td style="text-align: left;">0.005 (+/- 0.001)</td>
<td style="text-align: left;">0.713 (+/- 0.048)</td>
<td style="text-align: left;">1.000 (+/- 0.000)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">SVC</td>
<td style="text-align: left;">0.010 (+/- 0.003)</td>
<td style="text-align: left;">0.010 (+/- 0.001)</td>
<td style="text-align: left;">0.005 (+/- 0.002)</td>
<td style="text-align: left;">0.844 (+/- 0.043)</td>
<td style="text-align: left;">0.929 (+/- 0.017)</td>
</tr>
<tr class="even">
<td style="text-align: left;">Logistic Regression</td>
<td style="text-align: left;">0.012 (+/- 0.001)</td>
<td style="text-align: left;">0.005 (+/- 0.002)</td>
<td style="text-align: left;">0.011 (+/- 0.001)</td>
<td style="text-align: left;">0.004 (+/- 0.000)</td>
<td style="text-align: left;">0.849 (+/- 0.027)</td>
<td style="text-align: left;">0.889 (+/- 0.015)</td>
</tr>
Expand Down Expand Up @@ -492,22 +493,22 @@ <h2 data-number="4.1" class="anchored" data-anchor-id="discussion"><span
<tbody>
<tr class="odd">
<td style="text-align: left;">Decision Tree</td>
<td style="text-align: left;">0.012 (+/- 0.001)</td>
<td style="text-align: left;">0.004 (+/- 0.003)</td>
<td style="text-align: left;">0.009 (+/- 0.000)</td>
<td style="text-align: left;">0.005 (+/- 0.000)</td>
<td style="text-align: left;">0.778 (+/- 0.037)</td>
<td style="text-align: left;">0.960 (+/- 0.014)</td>
</tr>
<tr class="even">
<td style="text-align: left;">SVC</td>
<td style="text-align: left;">0.008 (+/- 0.003)</td>
<td style="text-align: left;">0.005 (+/- 0.003)</td>
<td style="text-align: left;">0.009 (+/- 0.001)</td>
<td style="text-align: left;">0.005 (+/- 0.002)</td>
<td style="text-align: left;">0.849 (+/- 0.040)</td>
<td style="text-align: left;">0.875 (+/- 0.007)</td>
</tr>
<tr class="odd">
<td style="text-align: left;">Logistic Regression</td>
<td style="text-align: left;">0.012 (+/- 0.001)</td>
<td style="text-align: left;">0.006 (+/- 0.001)</td>
<td style="text-align: left;">0.010 (+/- 0.003)</td>
<td style="text-align: left;">0.005 (+/- 0.002)</td>
<td style="text-align: left;">0.858 (+/- 0.053)</td>
<td style="text-align: left;">0.881 (+/- 0.009)</td>
</tr>
Expand Down
Binary file modified docs/index.pdf
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/results/figures/log_reg_feature_coefficients.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/results/models/heart_disease_lr_pipeline.pickle
Binary file not shown.
Binary file modified docs/results/models/heart_disease_svc_pipeline.pickle
Binary file not shown.
8 changes: 4 additions & 4 deletions docs/results/tables/baseline_cv_results.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
,fit_time,score_time,test_score,train_score
Dummy,0.009 (+/- 0.003),0.005 (+/- 0.003),0.543 (+/- 0.007),0.542 (+/- 0.002)
Decision tree,0.011 (+/- 0.003),0.003 (+/- 0.004),0.713 (+/- 0.048),1.000 (+/- 0.000)
SVC,0.010 (+/- 0.003),0.005 (+/- 0.002),0.844 (+/- 0.043),0.929 (+/- 0.017)
Logistic Regression,0.012 (+/- 0.001),0.005 (+/- 0.002),0.849 (+/- 0.027),0.889 (+/- 0.015)
Dummy,0.009 (+/- 0.002),0.004 (+/- 0.001),0.543 (+/- 0.007),0.542 (+/- 0.002)
Decision tree,0.009 (+/- 0.000),0.005 (+/- 0.001),0.713 (+/- 0.048),1.000 (+/- 0.000)
SVC,0.010 (+/- 0.001),0.005 (+/- 0.002),0.844 (+/- 0.043),0.929 (+/- 0.017)
Logistic Regression,0.011 (+/- 0.001),0.004 (+/- 0.000),0.849 (+/- 0.027),0.889 (+/- 0.015)
6 changes: 3 additions & 3 deletions docs/results/tables/best_model_cv_results.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
,fit_time,score_time,test_score,train_score
Decision Tree,0.012 (+/- 0.001),0.004 (+/- 0.003),0.778 (+/- 0.037),0.960 (+/- 0.014)
SVC,0.008 (+/- 0.003),0.005 (+/- 0.003),0.849 (+/- 0.040),0.875 (+/- 0.007)
Logistic Regression,0.012 (+/- 0.001),0.006 (+/- 0.001),0.858 (+/- 0.053),0.881 (+/- 0.009)
Decision Tree,0.009 (+/- 0.000),0.005 (+/- 0.000),0.778 (+/- 0.037),0.960 (+/- 0.014)
SVC,0.009 (+/- 0.001),0.005 (+/- 0.002),0.849 (+/- 0.040),0.875 (+/- 0.007)
Logistic Regression,0.010 (+/- 0.003),0.005 (+/- 0.002),0.858 (+/- 0.053),0.881 (+/- 0.009)
50 changes: 25 additions & 25 deletions docs/results/tables/coefficient_df.csv
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
,Feature,Coefficient
0,pipeline-1__ca,0.6746530980012033
1,onehotencoder__cp_4.0,0.6147850844622246
2,pipeline-2__thal_7.0,0.4500905306460702
3,standardscaler__oldpeak,0.4003883492123933
4,onehotencoder__exang_1.0,0.3237249830451551
5,onehotencoder__sex_1.0,0.29767725022535363
6,onehotencoder__slope_2.0,0.2755653019142275
7,standardscaler__trestbps,0.2533412125898724
8,onehotencoder__restecg_2.0,0.16872434784013016
9,onehotencoder__fbs_0.0,0.16101949734866505
10,standardscaler__age,0.02746164282563207
11,standardscaler__chol,0.014375789622327655
12,pipeline-2__thal_6.0,0.006372765391929292
13,onehotencoder__restecg_1.0,-0.007912214031971503
14,onehotencoder__cp_2.0,-0.05575603705702003
15,onehotencoder__slope_3.0,-0.12403495298838915
16,onehotencoder__slope_1.0,-0.15156029269537658
17,onehotencoder__restecg_0.0,-0.16084207757769697
18,onehotencoder__fbs_1.0,-0.16104944111820324
19,onehotencoder__cp_3.0,-0.24539930660403034
20,onehotencoder__sex_0.0,-0.2977071939948918
21,onehotencoder__cp_1.0,-0.31365968457071247
22,onehotencoder__exang_0.0,-0.32375492681469337
23,standardscaler__thalach,-0.40685822469471455
24,pipeline-2__thal_3.0,-0.45649323980753764
0,pipeline-1__ca,0.6746530980013775
1,onehotencoder__cp_4.0,0.6147850844628998
2,pipeline-2__thal_7.0,0.4500905306465596
3,standardscaler__oldpeak,0.4003883492107997
4,onehotencoder__exang_1.0,0.3237249830457789
5,onehotencoder__sex_1.0,0.2976772502272853
6,onehotencoder__slope_2.0,0.27556530191368384
7,standardscaler__trestbps,0.25334121258987014
8,onehotencoder__restecg_2.0,0.16872434784097426
9,onehotencoder__fbs_0.0,0.16101949734960588
10,standardscaler__age,0.027461642823905834
11,standardscaler__chol,0.014375789622254736
12,pipeline-2__thal_6.0,0.006372765392193168
13,onehotencoder__restecg_1.0,-0.007912214030664453
14,onehotencoder__cp_2.0,-0.05575603705710552
15,onehotencoder__slope_3.0,-0.12403495298677863
16,onehotencoder__slope_1.0,-0.1515602926951144
17,onehotencoder__restecg_0.0,-0.16084207757851895
18,onehotencoder__fbs_1.0,-0.16104944111781513
19,onehotencoder__cp_3.0,-0.2453993066042668
20,onehotencoder__sex_0.0,-0.29770719399549445
21,onehotencoder__cp_1.0,-0.3136596845697368
22,onehotencoder__exang_0.0,-0.3237549268139881
23,standardscaler__thalach,-0.40685822469452637
24,pipeline-2__thal_3.0,-0.456493239806962
9 changes: 9 additions & 0 deletions docs/results/tables/eda_output_summary_stats.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
,age,sex,cp,trestbps,chol,fbs,restecg,thalach,exang,oldpeak,slope,ca,thal,num
count,212.0,212.0,212.0,212.0,212.0,212.0,212.0,212.0,212.0,212.0,212.0,212.0,212.0,212.0
mean,54.570754716981135,0.6933962264150944,3.1650943396226414,130.8490566037736,246.9009433962264,0.1509433962264151,1.0518867924528301,149.78301886792454,0.33490566037735847,1.0330188679245282,1.6132075471698113,0.6273584905660378,4.721698113207547,0.45754716981132076
std,8.992345001278341,0.46217472084951555,0.9957770980357741,18.63762308789533,51.636485494046504,0.3588410209234944,0.9938894950423512,22.663206800936447,0.4730745365417657,1.1297126001262536,0.6168372889832545,0.8964419419212969,1.9307688087372425,0.49937365759235375
min,29.0,0.0,1.0,94.0,126.0,0.0,0.0,71.0,0.0,0.0,1.0,0.0,3.0,0.0
25%,48.0,0.0,3.0,120.0,207.75,0.0,0.0,133.75,0.0,0.0,1.0,0.0,3.0,0.0
50%,55.5,1.0,3.5,130.0,245.0,0.0,2.0,153.5,0.0,0.8,2.0,0.0,3.0,0.0
75%,60.25,1.0,4.0,140.0,276.25,0.0,2.0,165.25,1.0,1.6,2.0,1.0,7.0,1.0
max,77.0,1.0,4.0,200.0,564.0,1.0,2.0,202.0,1.0,4.4,3.0,3.0,7.0,1.0