Datasets:
The dataset viewer is not available for this split.
Error code: TooBigContentError
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
hls4ml LHC jet dataset (150 particles)
A mirror of the Zenodo record 10.5281/zenodo.3602260, reshaped to one row per jet.
The data are simulated high transverse-momentum (~1 TeV) jets from proton-proton collisions at the Large Hadron Collider, labelled by what produced them: a light quark, a gluon, a W boson, a Z boson or a top quark. Each jet is constituted of up to 150 constituents together with a set of jet-level observables, and the set was prepared for the hls4ml jet-tagging studies. The mirror holds 880,000 jets.
Every value is the value of the original HDF5 files. The jet images from the original data files are dropped.
One row is one jet
| column | type | holds |
|---|---|---|
the 16 j1_* columns |
list<float32> |
one entry per constituent of that jet, so the lists of one row all have the same length |
the 53 j_* columns |
float32 |
jet-level observables, one value per jet |
label |
int8 |
0 gluon, 1 light quark, 2 W boson, 3 Z boson, 4 top quark |
source_file |
string |
the HDF5 file the jet was read from, without its extension |
source_row |
int32 |
the jet's row within that file |
The constituent features, in the order the original files list them, are j1_px,
j1_py, j1_pz, j1_e, j1_erel, j1_pt, j1_ptrel, j1_eta, j1_etarel,
j1_etarot, j1_phi, j1_phirel, j1_phirot, j1_deltaR, j1_costheta and
j1_costhetarel. The jet-level features are j_ptfrac, j_pt, j_eta, j_mass,
j_tau1_b1, j_tau2_b1, j_tau3_b1, j_tau1_b2, j_tau2_b2, j_tau3_b2,
j_tau32_b1, j_tau32_b2, j_zlogz, j_c1_b0, j_c1_b1, j_c1_b2, j_c2_b1,
j_c2_b2, j_d2_b1, j_d2_b2, j_d2_a1_b1, j_d2_a1_b2, j_m2_b1, j_m2_b2,
j_n2_b1, j_n2_b2, j_tau1_b1_mmdt, j_tau2_b1_mmdt, j_tau3_b1_mmdt,
j_tau1_b2_mmdt, j_tau2_b2_mmdt, j_tau3_b2_mmdt, j_tau32_b1_mmdt,
j_tau32_b2_mmdt, j_c1_b0_mmdt, j_c1_b1_mmdt, j_c1_b2_mmdt, j_c2_b1_mmdt,
j_c2_b2_mmdt, j_d2_b1_mmdt, j_d2_b2_mmdt, j_d2_a1_b1_mmdt, j_d2_a1_b2_mmdt,
j_m2_b1_mmdt, j_m2_b2_mmdt, j_n2_b1_mmdt, j_n2_b2_mmdt, j_mass_trim,
j_mass_mmdt, j_mass_prun, j_mass_sdb2, j_mass_sdm1 and j_multiplicity. The
label is the argmax over the five one-hot columns j_g, j_q, j_w, j_z, j_t that
the original jets array ends with. The one-hot columns and the always-zero j_undef
beside them are not mirrored, but are replaced by label.
Splits
train and validation come from the Zenodo train archive. Its files are
concatenated in sorted-filename order and cut with
train_idx, validation_idx = train_test_split(np.arange(n), test_size=0.2, random_state=42)
test is the Zenodo val archive, in sorted-filename order.
| split | jets | gluon | light quark | W boson | Z boson | top quark |
|---|---|---|---|---|---|---|
train |
496,000 | 100,051 | 96,079 | 99,834 | 99,591 | 100,445 |
validation |
124,000 | 24,797 | 24,132 | 25,103 | 25,063 | 24,905 |
test |
260,000 | 52,404 | 50,468 | 52,235 | 52,298 | 52,595 |
Layout
data/train-NNNNN-of-NNNNN.parquet
data/validation-NNNNN-of-NNNNN.parquet
data/test-NNNNN-of-NNNNN.parquet
loader/ the pipeline described below
configs/ the Hydra tree that drives it
requirements.txt what that pipeline needs
Loading
The tables need only the datasets package:
from datasets import load_dataset
jets = load_dataset("fastmachinelearning/hls4ml_lhc_jets_150p", split="train")
jets[0]["j1_pt"] # the transverse momenta of that jet's constituents
This data record also contains a data processing pipeline that implements a few basic
recommended processing steps. It reads the parquet files, keeps the leading constituents
by transverse momentum, normalises each feature by a scale fitted on the training split
alone, caches the result as .npy, and hands back torch tensors:
import sys
from huggingface_hub import snapshot_download
from hydra import compose, initialize_config_dir
from hydra.utils import instantiate
record = snapshot_download("fastmachinelearning/hls4ml_lhc_jets_150p", repo_type="dataset")
sys.path.insert(0, record) # the configs name loader.*, so the record has to be importable
with initialize_config_dir(config_dir=record + "/configs", version_base=None):
cfg = compose("config", overrides=["paths.root_dir=" + record, "data.nconstituents=32"])
data = instantiate(cfg.data)
data.prepare()
train = data.load("train")
The train.x object is a (jets, 32, 16) float32 tensor of normalised constituents and
train.y a (jets, 5) float32 one-hot tensor of the labels. The
data.load("validation") and the data.load("test") objects return the other two
splits, normalised with the scales fitted on train. The data.nconstituents is used
to set the maximum number of constituents per jet; 0 or less keeps all 150. Again,
these are ordered by descending transverse momentum by the data loader. Data that is
processed in different ways using the record's dataloader are cached on disk in
different ways; hence, there's no duplicate preprocessing.
The prepare method writes the caches under the ./cache folder. Please set the
HLS4ML_JETS_CACHE environment to move this elsewhere. Additionally, prepare reads
the shards from HLS4ML_JETS_ROOT when the overrides above are left out. Allow the
cache a few times the record's size on disk. The pipeline needs python 3.11 or newer
with numpy, pyarrow, torch, omegaconf and hydra-core, which pip install -r requirements.txt at the record's root installs. If you only want the raw tables, you
need none of the dataloader functionality. Just call load_dataset.
Caveats
Constituents are stored in descending transverse momentum, the order they sit in the
original files. Every jet of all three splits was checked: no list holds a constituent
with a higher j1_pt than the one before it. The loader in this record still
stable-sorts each jet by descending j1_pt before it truncates to nconstituents or
pads up to it, because the reference pipeline does. The sort of the dataloader acts as a
double-check that constiutents are stored in descending order. Truncating the lists as
they come therefore keeps the same leading constituents.
The lists have no padding or fixed length. A jet holds as many entries as it has constituents, up to 150. The original files pad every jet to 150 slots with rows of zeros; those slots are dropped here and rebuilt by the loader.
The jet images are not mirrored. The original files carry jetImage, jetImageECAL
and jetImageHCAL, three 100x100 arrays per jet, which dwarf everything else. Take them
from Zenodo if you need them.
Provenance
Simulated proton-proton collisions at the LHC, produced for the hls4ml jet-tagging
studies and published on Zenodo in 2020 by Maurizio Pierini, Javier Duarte, Nhan Tran
and Marat Freytsis. This mirror was built from the two archives of that record,
hls4ml_LHCjet_150p_train.tar.gz and hls4ml_LHCjet_150p_val.tar.gz, by the code at
https://github.com/bb511/jet_tagging_datamaker. The data were produced at commit
1718726 of that
repository.
Citation
Cite the Zenodo record this dataset mirrors.
@dataset{pierini_hls4ml_lhc_jets_150p_2020,
author = {Pierini, Maurizio and Duarte, Javier and Tran, Nhan and Freytsis, Marat},
title = {HLS4ML LHC Jet dataset (150 particles)},
year = {2020},
publisher = {Zenodo},
doi = {10.5281/zenodo.3602260},
url = {https://doi.org/10.5281/zenodo.3602260}
}
Licence
CC BY 4.0, the licence of the original record. See LICENSE. Use it for anything,
including commercially, as long as you credit Pierini, Duarte, Tran and Freytsis, link
the licence at https://creativecommons.org/licenses/by/4.0/, and say what you changed.
Contact
Questions and problems are welcome as a discussion on this dataset's page, or as an issue on the repository that produced it: https://github.com/bb511/jet_tagging_datamaker.
- Downloads last month
- -