Skip to content

Home

class-e Logo

A fast & user-friendly emulation framework for the Boltzmann solver CLASS and its extensions.

image image Source Code

What it offers

  • Data generation: Sobol, Latin hypercube, hypersphere and covariance-aware designs, run in crash-isolated worker processes or as SLURM arrays, with checkpoints and resumable chunks.
  • Observables: CMB spectra (TT, TE, EE, PP), matter power spectrum and transfer functions.
  • Emulators: Gaussian processes on compressed outputs (PCA or VAE), with sklearn, jax and vae backends. The JAX backends are differentiable.
  • Accuracy reports: errors in units of cosmic variance, per multipole range and per parameter bin, with figures and an HTML report.
  • Portable bundles: one .cemu file holds the emulators, prior box and metadata, with no pickles.
  • Any CLASS build: AxiCLASS, Hi-CLASS or your own fork, see Custom CLASS builds.

Pipeline

generate -> train -> evaluate -> use the bundle (all driven by one YAML):

class-e generate cfg.yaml                 # datasets with CLASS
class-e train    cfg.yaml                 # emulators -> bundle.cemu
class-e evaluate bundle.cemu -c cfg.yaml  # accuracy report
Next
Installation extras and CLASS
Quickstart the pipeline in a minute
CLI reference all commands and flags
API reference the Python modules

Citation

If you use class-e, please cite the paper below and the original CLASS paper (Blas, Lesgourgues and Tram, JCAP 2011, 034).

@article{Calderon2026,
  title={class-e: Emulating the Boltzmann solver CLASS and its extensions},
  author={Calderón, R. and others},
  journal={Journal of Cosmology and Astroparticle Physics},
  year={2026}
}