A CNN for probabilistic 3D direction predicitions.
Contains functions, classes, and dictionaries that are used throughout.
Contains all models, which includes:
- spConvnet_HSCDC_subM: A heteroscedastic convnet for probabilistic direction predictions (creates vMF-NN or Gauss-NN model, depending on loss function used)
- spConvnet_subM: A homoscedastic convnet for point estimate predictions (creates Det-NN model)
- NML: A non-ML algorithim originally developed for X-ray polarimetry (Non-ML model)
- NML2: A method which uses information that is only available in simulation to estimate the best expected performance (Best-Expected model)
An exploratory notebook for reading, processing, saving, and loading the electron simulation data. Contains figures / examples throughout all stages of the preprocessing.
This script reads in raw simulations (stored as root files) and process them (into pickle files), doing the following:
- Applies diffusion to the data
- Applies a random rotation
- Mean-ceneters each simulation
This script reads the pickle files from process_data.py data and outputs PyTorch sparse tensors in the COO format. It also outputs pickle files that store the coresponding labels (true directions), and other information (offset, energy, applied diffusion).
Defines and generates a data set of arrows pointing in random direction for the toy test case to demonstrate the model is general.
A jupyter notebook that illustrates some of the practicle issues encountered while training the heterscedastic model
Notebook where we train the Det-NN model on a toy test case (arrows). Here the convnet quickly learns to predict the directions of 3D arrows.
Notebook where we train the vMF-NN on a toy test case (arrows). Here the convnet quickly learns to predict the direction of 3D arrows with a very small directional uncertainty.
Notebook where we train the Det-NN model on electron simulations.
Notebook where we train the vMF-NN model on electron simulations.
Notebook where we train the Gauss-NN model on electron simulations.
A script used to tune the parameters of the non-ML algorithim originally developed for X-ray polarimetry.
A script used to tune the method which uses information that is only available in simulation to estimate the best expected performance.
A notebook for testing and comparing models on the electron simulation test sets.
A notebook for testing Det-NN and vMF-NN on the toy problem of detecting arrow directions.
A notebook for testing the calibration of the vMF-NN model.
A python script that creates figures depicting the dense portions of the Det-NN and vMF-NN models.
A slurm script for queuing jobs that run a jupyter notebook.
If you find this useful to your work, please cite
@article{Ghrear_2024,
doi = {10.1088/2632-2153/ad5f13},
url = {https://dx.doi.org/10.1088/2632-2153/ad5f13},
year = {2024},
month = {jul},
publisher = {IOP Publishing},
volume = {5},
number = {3},
pages = {035009},
author = {Majd Ghrear and Peter Sadowski and Sven E Vahsen},
title = {Deep probabilistic direction prediction in 3D with applications to directional dark matter detectors},
journal = {Machine Learning: Science and Technology},
}