SECRET: Stochasticity Emulator for Cosmic Ray Electrons
The MADE and SECRET codes perform density estimation for the intensity of cosmic-ray electrons. This is based on the auto-regressive Masked Autoencoder for Distribution Estimation (MADE).
Getting started
We provide a minimal example in the jupyter-notebook minimal_example.ipynb
.
Training MADE and SECRET
Furthermore, the code also contains scripts to train MADE or SECRET from scratch. This requires download of the Monte Carlo simulation datasets from Zenodo. Then the training can be executed e.g. as follows:
python train_made.py
-e <number of epochs to train for>
-s <the epoch to start the training at. Useful for continuing training from an already
-i <number of input nodes>
-l <add a hidden layer with that many nodes, stacks>
-o <number of output components>
For example, the call for the MADE training used as the single-point model in the paper looks like this:
python train_made.py -e 500 -i 19 -l 100 -l 100 -o 10
Dependencies
The code requires the following packages:
- numpy (>= 1.23.4)
- pytorch (>=1.12.1)
- h5py (>=3.7.0)
- scikit-learn (>=1.4.0)
Citation
If you are using MADE or SECRET in your research work, please refer to the following publication: Nikolas Frediani, Michael Krämer, Philipp Mertsch and Kathrin Nippel, "SECRET: Stochasticity Emulator for Cosmic Ray Electrons", arXiv:2501.06011.