Skip to content

Commit

Permalink
Sushobhan/notebooks (#137)
Browse files Browse the repository at this point in the history
In this PR, we got rid of the progress bar in Jupyter notebooks.

---------

Co-authored-by: sp3886 <[email protected]>
  • Loading branch information
sushobhan2024 and sp3886 authored Nov 27, 2024
1 parent d631ce9 commit 4fef134
Show file tree
Hide file tree
Showing 7 changed files with 231 additions and 3,546 deletions.
24 changes: 12 additions & 12 deletions notebooks/dvc.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ stages:
size: 34022756
- path: mind-val.md
hash: md5
md5: 98da8d4dc5035ce161aa00570d4a57d7
size: 3904
md5: 386c3b5588f70d8a845b0faaa52c4859
size: 3758
outs:
- path: mind-val.ipynb
hash: md5
md5: 2b88e611840bc5cecf8514974c130261
size: 238860
md5: 4f455a947e02d17f65891628a6528c75
size: 180580
results-mind-small:
cmd: jupytext --to notebook --execute mind-small.md
deps:
Expand All @@ -25,13 +25,13 @@ stages:
size: 6610049
- path: mind-small.md
hash: md5
md5: 66e2d75efa9fb3796da73ef92bcc066f
size: 3920
md5: 170f50dd7278beff3c040fed5ded0074
size: 3774
outs:
- path: mind-small.ipynb
hash: md5
md5: 73e42e9837a4f7062cd6d80e95743207
size: 240522
md5: 005446bda1bdd11ecf7774229b0eb970
size: 182164
results-mind-subset:
cmd: jupytext --to notebook --execute mind-subset.md
deps:
Expand All @@ -41,10 +41,10 @@ stages:
size: 90985
- path: mind-subset.md
hash: md5
md5: 3694cb25f775afee76bc3eaf2729c4ec
size: 3928
md5: fd56e0a68ae9edd86be8a2a0fda2b78d
size: 3782
outs:
- path: mind-subset.ipynb
hash: md5
md5: 5279703b4407243495a8756ba258b75e
size: 236731
md5: 092a19124e7bf3f3f0e336d75d112284
size: 178521
1,231 changes: 66 additions & 1,165 deletions notebooks/mind-small.ipynb

Large diffs are not rendered by default.

10 changes: 2 additions & 8 deletions notebooks/mind-small.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ from IPython.display import HTML
from poprox_recommender.eval_tables import EvalTable
```

Set up progress:

```{code-cell} ipython3
from tqdm.autonotebook import tqdm as notebook_tqdm
```

### 1. 2 Loading Data

```{code-cell} ipython3
Expand Down Expand Up @@ -85,7 +79,7 @@ The summary tables show the mean values, standard deviation, and quantiles (10%i

```{code-cell} ipython3
for metric in effectiveness_metrics:
tw = EvalTable(mind_small_user_metrics, "recommender", metric, progress=notebook_tqdm)
tw = EvalTable(mind_small_user_metrics, "recommender", metric)
tw.add_stat("Mean", np.mean, ci=True)
tw.add_stat("Std Dev", np.std, ci=True)
tw.add_quantiles(["10%ile", "Median", "90%ile"], [0.1, 0.5, 0.9], ci=True)
Expand All @@ -112,7 +106,7 @@ The summary tables show the mean values, standard deviation, and quantiles (10%i

```{code-cell} ipython3
for metric in overlap_metrics:
tw = EvalTable(mind_small_user_metrics, "recommender", metric, progress=notebook_tqdm)
tw = EvalTable(mind_small_user_metrics, "recommender", metric)
tw.add_stat("Mean", np.mean, ci=True)
tw.add_stat("Std Dev", np.std, ci=True)
tw.add_quantiles(["10%ile", "Median", "90%ile"], [0.1, 0.5, 0.9], ci=True)
Expand Down
1,267 changes: 84 additions & 1,183 deletions notebooks/mind-subset.ipynb

Large diffs are not rendered by default.

10 changes: 2 additions & 8 deletions notebooks/mind-subset.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ from IPython.display import HTML
from poprox_recommender.eval_tables import EvalTable
```

Set up progress:

```{code-cell} ipython3
from tqdm.autonotebook import tqdm as notebook_tqdm
```

### 1. 2 Loading Data

```{code-cell} ipython3
Expand Down Expand Up @@ -85,7 +79,7 @@ The summary tables show the mean values, standard deviation, and quantiles (10%i

```{code-cell} ipython3
for metric in effectiveness_metrics:
tw = EvalTable(mind_subset_user_metrics, "recommender", metric, progress=notebook_tqdm)
tw = EvalTable(mind_subset_user_metrics, "recommender", metric)
tw.add_stat("Mean", np.mean, ci=True)
tw.add_stat("Std Dev", np.std, ci=True)
tw.add_quantiles(["10%ile", "Median", "90%ile"], [0.1, 0.5, 0.9], ci=True)
Expand All @@ -112,7 +106,7 @@ The summary tables show the mean values, standard deviation, and quantiles (10%i

```{code-cell} ipython3
for metric in overlap_metrics:
tw = EvalTable(mind_subset_user_metrics, "recommender", metric, progress=notebook_tqdm)
tw = EvalTable(mind_subset_user_metrics, "recommender", metric)
tw.add_stat("Mean", np.mean, ci=True)
tw.add_stat("Std Dev", np.std, ci=True)
tw.add_quantiles(["10%ile", "Median", "90%ile"], [0.1, 0.5, 0.9], ci=True)
Expand Down
1,225 changes: 63 additions & 1,162 deletions notebooks/mind-val.ipynb

Large diffs are not rendered by default.

10 changes: 2 additions & 8 deletions notebooks/mind-val.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ from IPython.display import HTML
from poprox_recommender.eval_tables import EvalTable
```

Set up progress:

```{code-cell} ipython3
from tqdm.autonotebook import tqdm as notebook_tqdm
```

### 1. 2 Loading Data

```{code-cell} ipython3
Expand Down Expand Up @@ -85,7 +79,7 @@ The summary tables show the mean values, standard deviation, and quantiles (10%i

```{code-cell} ipython3
for metric in effectiveness_metrics:
tw = EvalTable(mind_val_user_metrics, "recommender", metric, progress=notebook_tqdm)
tw = EvalTable(mind_val_user_metrics, "recommender", metric)
tw.add_stat("Mean", np.mean, ci=True)
tw.add_stat("Std Dev", np.std, ci=True)
tw.add_quantiles(["10%ile", "Median", "90%ile"], [0.1, 0.5, 0.9], ci=True)
Expand All @@ -112,7 +106,7 @@ The summary tables show the mean values, standard deviation, and quantiles (10%i

```{code-cell} ipython3
for metric in overlap_metrics:
tw = EvalTable(mind_val_user_metrics, "recommender", metric, progress=notebook_tqdm)
tw = EvalTable(mind_val_user_metrics, "recommender", metric)
tw.add_stat("Mean", np.mean, ci=True)
tw.add_stat("Std Dev", np.std, ci=True)
tw.add_quantiles(["10%ile", "Median", "90%ile"], [0.1, 0.5, 0.9], ci=True)
Expand Down

0 comments on commit 4fef134

Please sign in to comment.