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

Add tutorial notebook for RISE on FRB timeseries data #714

Merged
merged 14 commits into from
Mar 25, 2024
Merged

Conversation

loostrum
Copy link
Member

Also includes the FRB data itself, so this PR relates to both #707 and #710.

The FRB data and model nearly work with DIANNA timeseries as-is. The only issue is that the data needs some reshaping, as DIANNA expects data in (time, channel) format while the FRB model uses (channel, time). This is further explained in the notebook.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@loostrum
Copy link
Member Author

To Do:

  • add to README in tutorials folder (need to find a logo to represent FRB data)

@loostrum
Copy link
Member Author

loostrum commented Mar 5, 2024

Tutorial added to README, logo will come later (see #719).
I've also added an explainer on a few modified versions of the input, to make the notebook a bit more interesting.

@loostrum loostrum requested a review from cwmeijer March 5, 2024 14:43
@loostrum
Copy link
Member Author

loostrum commented Mar 5, 2024

#718 is handled in this PR as well - I considered doing it separately but when reviewing notebooks I thought it easier to just have everything in one go.

@elboyran elboyran self-requested a review March 6, 2024 08:59
@elboyran
Copy link
Contributor

elboyran commented Mar 6, 2024

Ah, meanwhile, I have messed up with the structure affecting mist the notebooks and their data, labels, and models in #699 (currently up to reviewing)... I wonder what order of merging is best?

tutorials/rise_timeseries_frb.ipynb Outdated Show resolved Hide resolved
tutorials/rise_timeseries_frb.ipynb Outdated Show resolved Hide resolved
tutorials/rise_timeseries_frb.ipynb Outdated Show resolved Hide resolved
tutorials/rise_timeseries_frb.ipynb Outdated Show resolved Hide resolved
Copy link
Contributor

@cwmeijer cwmeijer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great notebook with the extra's about shifting and adding other sources. One of the coolest tutorials that we have now! Thanks for giving this some love ;-)

I made some comments about some details.

tutorials/README.md Outdated Show resolved Hide resolved
tutorials/README.md Outdated Show resolved Hide resolved
.gitignore Show resolved Hide resolved
@loostrum
Copy link
Member Author

loostrum commented Mar 6, 2024

Thanks for your comments @elboyran and @cwmeijer, I'll get back to them early next week!

@elboyran
Copy link
Contributor

elboyran commented Mar 7, 2024

Thanks for your comments @elboyran and @cwmeijer, I'll get back to them early next week!

@loostrum , at the last stand-up, only myself and @cwmeijer were present and I had put a "stand-up" label for my issue (and branch) #667 (PR #699). We think, that if you have to address some comments anyway, maybe you can also apply the small changes according to the new folder structure and we merge my PR first, what do you think? I'll put soon the folder structure in "main" and in "667-reorganize" for convenience.

@elboyran
Copy link
Contributor

elboyran commented Mar 7, 2024

Old and proposed folder structures of dianna/dianna and dianna/tutorials :

main branch

dianna (6 directories, 56 files)

├── init.py
├── ...
├── dashboard
│   ├── ...
├── data
│   ├── bee_2.png
│   ├── binary-mnist.npz
│   ├── digit0.jpeg
│   ├── digit0.jpg
│   ├── digit0.png
│   ├── digit1.png
│   ├── labels_mnist.txt
│   ├── labels_resnet50.txt
│   ├── labels_text.txt
│   ├── leafsnap_model.onnx
│   ├── logo.png
│   ├── mnist_model_tf.onnx
│   ├── movie_review_model.onnx
│   ├── movie_reviews_word_vectors.txt
│   ├── season_prediction_model_temp_max_binary.onnx
│   ├── weather_data.npy
│   └── weather_data_labels.txt
├── methods
│   ├── ...
├── utils
│   ├── ...
└── visualization
│   ├── ...

tutorials (4 directories, 38 files)

├── README.md
├── conversion_onnx
│   ├── ...
├── data
│   ├── binary-mnist.npz
│   ├── coffee_test.csv
│   ├── coffee_train.csv
│   ├── leafsnap_classes.csv
│   ├── leafsnap_example_acer_rubrum.jpg
│   ├── movie_reviews_word_vectors.txt
│   └── shapes.npz
├── demo.ipynb
├── img
│   ├── bee.jpg
│   └── digit0.jpg
├── kernelshap_geometric_shapes.ipynb
├── kernelshap_mnist.ipynb
├── kernelshap_tabular_penguin.ipynb
├── kernelshap_tabular_weather.ipynb
├── lime_images.ipynb
├── lime_tabular_penguin.ipynb
├── lime_tabular_weather.ipynb
├── lime_text.ipynb
├── lime_timeseries_coffee.ipynb
├── lime_timeseries_weather.ipynb
├── models
│   ├── coffee.onnx
│   ├── geometric_shapes_model.onnx
│   ├── leafsnap_model.onnx
│   ├── mnist_model.onnx
│   ├── mnist_model_tf.onnx
│   ├── movie_review_model.onnx
│   ├── penguin_model.onnx
│   ├── season_prediction_model_temp_max_binary.onnx
│   └── sunshine_hours_regression_model.onnx
├── rise_imagenet.ipynb
├── rise_mnist.ipynb
├── rise_text.ipynb
└── rise_timeseries_weather.ipynb


667-reorganize branch

dianna (8 directories, 66 files)

├── init.py
├── ...
├── dashboard
│   ├── ...
├── data
│   ├── bee.jpg
│   ├── binary-mnist.npz
│   ├── digit0.jpeg
│   ├── digit0.jpg
│   ├── digit0.png
│   ├── digit1.png
│   ├── leafsnap_example_acer_rubrum.jpg
│   ├── logo.png
│   ├── shapes.npz
│   └── weather_data.npy
├── labels
│   ├── coffee_test.csv
│   ├── coffee_train.csv
│   ├── labels_mnist.txt
│   ├── labels_resnet50.txt
│   ├── labels_text.txt
│   ├── leafsnap_classes.csv
│   ├── movie_reviews_word_vectors.txt
│   └── weather_data_labels.txt
├── methods
│   ├── ...
├── models
│   ├── coffee.onnx
│   ├── geometric_shapes_model.onnx
│   ├── leafsnap_model.onnx
│   ├── mnist_model.onnx
│   ├── mnist_model_tf.onnx
│   ├── movie_review_model.onnx
│   ├── penguin_model.onnx
│   ├── season_prediction_model_temp_max_binary.onnx
│   └── sunshine_hours_regression_model.onnx
├── utils
│   ├── ...
└── visualization
├── ...

tutorials (5 directories, 20 files)

├── README.md
├── conversion_onnx
│   ├── ...
├── demo.ipynb
└── explainers
├── KernelSHAP
│   ├── kernelshap_geometric_shapes.ipynb
│   ├── kernelshap_mnist.ipynb
│   ├── kernelshap_tabular_penguin.ipynb
│   └── kernelshap_tabular_weather.ipynb
├── LIME
│   ├── lime_images.ipynb
│   ├── lime_tabular_penguin.ipynb
│   ├── lime_tabular_weather.ipynb
│   ├── lime_text.ipynb
│   ├── lime_timeseries_coffee.ipynb
│   └── lime_timeseries_weather.ipynb
└── RISE
├── rise_imagenet.ipynb
├── rise_mnist.ipynb
├── rise_text.ipynb
└── rise_timeseries_weather.ipynb

@loostrum
Copy link
Member Author

Thanks for your comments @elboyran and @cwmeijer, I'll get back to them early next week!

@loostrum , at the last stand-up, only myself and @cwmeijer were present and I had put a "stand-up" label for my issue (and branch) #667 (PR #699). We think, that if you have to address some comments anyway, maybe you can also apply the small changes according to the new folder structure and we merge my PR first, what do you think? I'll put soon the folder structure in "main" and in "667-reorganize" for convenience.

Yes that seems like a good idea! When #699 is merged I'll check that this PR then matches the new layout

@loostrum
Copy link
Member Author

Most review comments handled, logo added. I'm not sure what to do about the FRB dataset section. We identify a tutorial by a logo and then explain that logo by connecting it to a dataset, but for the FRB case there is no public dataset. I've left out a hyperlink for now. I can also link it to the paper where the model and its training are explained?

@loostrum
Copy link
Member Author

Note: the Mac OS on Python 3.11 CI is failing for reasons unrelated to this PR

@loostrum loostrum added the standup Temp label- for disscussion with the team next standup label Mar 13, 2024
@loostrum loostrum removed the standup Temp label- for disscussion with the team next standup label Mar 13, 2024
tutorials/rise_timeseries_frb.ipynb Outdated Show resolved Hide resolved
tutorials/rise_timeseries_frb.ipynb Outdated Show resolved Hide resolved
tutorials/rise_timeseries_frb.ipynb Outdated Show resolved Hide resolved
Copy link
Contributor

@elboyran elboyran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small suggestions in notebook.

@loostrum
Copy link
Member Author

@elboyran could you check if your comments are now adequately addressed? Then I think this is ready for merging

Copy link
Contributor

@elboyran elboyran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks nice. Only some MD links checks should pass.

@loostrum loostrum merged commit 6fe3359 into main Mar 25, 2024
16 of 17 checks passed
@loostrum loostrum deleted the frb-timeseries branch March 25, 2024 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
3 participants