# CUQIpy Case study Hackathon
#### Bernstorff Castle 🏰, 9-10 Oct 2023
## Programme
#### Monday 9 Oct
| Time | Activity |
| -------- | -------- |
|09:00 | Welcome
|09:10 | CUQIpy crash course
|10:30 | Team building with senior staff
|12:00 | --- Lunch break ---
|13:00 | Hackathon: Project pitches and group formation
|13:45 | Hackathon: Planning session - identify and assign tasks
|14:30 | --- Coffee break ---
|15:00 | Brief update from groups
|15:15 | Time to hack!
|16:50 | Wrap-up of the day
|17:00 | --- Break/end of day ---
|18:00 | Dinner
|19:30 | Free time - CUQIpy team avaiable in the bar!
#### Tuesday 10 Oct
| Time | Activity |
| -------- | -------- |
|09:00 | Welcome
|09:15 | Time to hack!
|10:30 | --- Coffee break ---
|10:45 | Time to hack!
|11:45 | Brief round of updates
|12:00 | --- Lunch break ---
|13:00 | Time to hack! - and prepare notebook presentations.
|15:00 | Notebook presentation of cases to other groups and senior staff
|16:20 | Wrap-up and steps from here
|16:30 | End of Day 2
## Resources
- Main repository: https://github.com/CUQI-DTU/CUQIpy
- Training notebooks: https://github.com/CUQI-DTU/CUQIpy-demos
- Installation: `pip install cuqipy`
- Documentation incl. Getting Started: https://cuqi-dtu.github.io/CUQIpy/
- CUQIpy on CUQI project website: https://sites.dtu.dk/cuqi#Software
- Slides: https://tinyurl.com/cuqi23slides
## Plugins
- CUQIpy-CIL: https://github.com/CUQI-DTU/CUQIpy-CIL
- CUQIpy-FEniCS: https://github.com/CUQI-DTU/CUQIpy-FEniCS
- API documentation: https://cuqi-dtu.github.io/CUQIpy-FEniCS/
- CUQIpy-PyTorch: https://github.com/CUQI-DTU/CUQIpy-PyTorch
## DTU Jupyter notebook servers
If not installing CUQIpy on own computer, you can use one of the two learnmore servers (we have set it up so that your usual DTU username and password should work, please let us know if this is not the case)):
- https://learnmore1.compute.dtu.dk
- https://learnmore2.compute.dtu.dk
When logged in to the learnmore servers you should see a "launcher" tab with some icons to start new notebooks with different python packages installed. You can use the following ones:
- CUQIpy
- CIL (has CUQIpy-CIL plugin)
- CUQIpy-PyTorch
In the launcher you also see an icon "terminal", click that to start a linux terminal. In the you type/copy-paste:
```
git clone https://github.com/CUQI-DTU/CUQIpy-demos.git
```
This will clone/copy the CUQIpy demos to your directory, then you can navigate in the left menu into the training folder and start the training notebooks. You need to change the "kernel" in the top right corner to e.g. the "CUQIpy" one, in order for the notebook to have access to the python packages installed in there such as CUQIpy.
Alternatively you can use Google colab:
- https://colab.research.google.com/
If using Google colab, add a link to the CUQIpy demos repository:
https://github.com/CUQI-DTU/CUQIpy-demos
and run command
```
!pip install cuqipy
```
## Hackathon projects
List project topics here and add names of individuals taking part:
1. Batman and Robin (Aksel and Kristoffer)
2. ODE guys (Charlie and Felipe)
3. The Belgians (Jasper and Remi)
4. Mixture guys (Rafael and Felipe)
5. LA Convoluters (Lara and Andreas)
6. Sampler rework (Babak)
7. Enhanced Error Model (Puyuan)
## Feedback
- We greatly appreciate it if you can take few moments to let us know about your CUQIpy training experience in this post-training feedback form: https://tinyurl.com/cuqipy23hack
## Acknowledgments
- This work was supported by The Villum Foundation (grant no. 25893).
- Thanks to all CUQI project members for valuable input and contributions to CUQIpy!
- And **thank you** for participating in the CUQIpy training and hackathon! Please let us know what you think about the software and the training using the the feedback link just above.
## Discussion:
-
## Did you discover any bugs or strange behaviour?
- 'precision' paramter in Laplace should be called 'rate' such that is not confused with inverse of variance
## Feature wishlist
- would be nice if it was possible to call, eg, pdf of a distribution object on a vector. M(not)WE:
```
from cuqi.distribution import Gaussian
import numpy as np
X = Gaussian(0, 1)
xx = np.linspace(-1, 1, 100)
xx_pdf = Gaussian.pdf(xx)
```
- Acceptance-Rejection, Importance sampling (with importance resampling)
## Documentation issues
- Contributer's guide -> style guide: minimum example of a Distribution is incorrect, "logpdf" is mandatory instead of "_logd".