Jets + ML integration
Project description
JetNet
A library for developing and reproducing jet-based machine learning (ML) projects.
JetNet provides common standardized PyTorch-based datasets, evaluation metrics, and loss functions for working with jets using ML. Currently supports the flagship JetNet dataset, and the Fréchet ParticleNet Distance (FPND), Wasserstein-1 (W1), coverage and minimum matching distance (MMD) metrics all introduced in Ref. [1], as well as jet utilities and differentiable implementation of the energy mover's distance [2] for use as a loss function. Additional functionality is currently under development.
Installation
JetNet can be installed with pip:
pip install jetnet
To use the differentiable EMD loss jetnet.losses.EMDLoss
, additional libraries must be installed via
pip install "jetnet[emdloss]"
Finally, PyTorch Geometric must be installed independently for the Fréchet ParticleNet Distance metric jetnet.evaluation.fpnd
(Installation instructions).
Quickstart
Datasets can be loaded quickly with, for example:
dataset = jetnet.datasets.JetNet(jet_type='g')
Evaluation metrics can be used as such:
generated_jets = np.random.rand(50000, 30, 3)
fpnd_score = jetnet.evaluation.fpnd(generated_jets, jet_type='g')
Loss functions can be initialized and used similarly to standard PyTorch in-built losses such as MSE:
emd_loss = jetnet.losses.EMDLoss(num_particles=30)
loss = emd_loss(real_jets, generated_jets)
loss.backward()
Documentation
Full API reference is available at jetnet.readthedocs.io.
More detailed information about each dataset can (or will) be found at jet-net.github.io.
Tutorials for datasets and functions are coming soon.
References
[1] R. Kansal et al. Particle Cloud Generation with Message Passing Generative Adversarial Networks (2021) [2106.11535]
[2] P. T. Komiske, E. M. Metodiev, and J. Thaler, The Metric Space of Collider Events, Phys. Rev. Lett. 123 (2019) 041801 [1902.02346].
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for jetnet-0.0.3.post3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11d15fd0909783ccadee282c4bbed300a3b19e56a8ae6fd9abcee09f1c4845e4 |
|
MD5 | bfb3f4964e812bed4734bba1ec74c06c |
|
BLAKE2b-256 | 93d7ca302b297500c8f3f38ebff33eaf0200024ccf23c99fbe7dbd3fb7328e90 |