API reference

Capse.CℓEmulatorType
CℓEmulator(TrainedEmulator::AbstractTrainedEmulators, ℓgrid::Array,
InMinMax::Matrix, OutMinMax::Matrix)

This is the fundamental struct used to obtain the $C_\ell$'s from an emulator. It contains:

  • TrainedEmulator::AbstractTrainedEmulators, the trained emulator

  • ℓgrid::AbstractVector, the $\ell$-grid the emulator has been trained on.

  • InMinMax::AbstractMatrix, the Matrix used for the MinMax normalization of the input features

  • OutMinMax::AbstractMatrix, the Matrix used for the MinMax normalization of the output features

  • Postprocessing::Function, the Function used for the postprocessing of the NN output

source
Capse.get_CℓFunction
get_Cℓ(input_params, Cℓemu::AbstractCℓEmulators)

Computes and returns the $C_\ell$'s on the $\ell$-grid the emulator has been trained on given input array input_params.

source
Capse.get_ℓgridFunction
get_ℓgrid(CℓEmulator::AbstractCℓEmulators)

Returns the $\ell$-grid the emulator has been trained on.

source
Capse.load_emulatorFunction
load_emulator(path::String, emu_backend::AbstractTrainedEmulators)

Load the emulator with the files in the folder path, using the backend defined by emu_backend. The following keyword arguments are used to specify the name of the files used to load the emulator:

  • ℓ_file, default l.npy
  • weights_file, default weights.npy
  • inminmax_file, default inminmax.npy
  • outminmax_file, default outminmax.npy
  • nn_setup_file, default nn_setup.json
  • postprocessing_file, default postprocessing.jl

If the corresponding file in the folder you are trying to load have different names, change the default values accordingly.

source