swiftemulator.backend.emulator_generator module

Emulator generation object.

class swiftemulator.backend.emulator_generator.EmulatorGenerator(model_specification: ModelSpecification, model_parameters: ModelParameters)[source]

Bases: object

Generator for emulators for individual scaling relations.

Parameters:
  • model_specification (ModelSpecification) – Full instance of the model specification.

  • model_parameters (ModelParameters) – Full instance of the model parameters.

Notes

The required initialisation parameters are shared amongst all emulators that the emulator generator produces.

model_specification: ModelSpecification
model_parameters: ModelParameters
create_gaussian_process_emulator(model_values: ModelValues) GaussianProcessEmulator[source]

Creates an individual emulator for an individual scaling relation described by the provided model_values.

Parameters:
  • model_values – The model values structure for this given scaling relation. This specifies the training data for the emulator.

  • ModelValues – The model values structure for this given scaling relation. This specifies the training data for the emulator.

Returns:

The built and trained emulator ready for prediction steps.

Return type:

emulator, GaussianProcessEmulator

create_gaussian_process_emulator_mcmc(model_values: ModelValues) GaussianProcessEmulatorMCMC[source]

Creates the object needed for the hyperparameter_investigator function

Parameters:
  • model_values – The model values structure for this given scaling relation. This specifies the training data for the emulator.

  • ModelValues – The model values structure for this given scaling relation. This specifies the training data for the emulator.

Returns:

The built emulator ready for analysis of hyperparameters

Return type:

emulator, GaussianProcessEmulatorMCMC

create_gaussian_process_emulator_bins(model_values: ModelValues) GaussianProcessEmulatorBins[source]

Creates the object needed for the binned emulator

Parameters:
  • model_values – The model values structure for this given scaling relation. This specifies the training data for the emulator.

  • ModelValues – The model values structure for this given scaling relation. This specifies the training data for the emulator.

Returns:

The built emulator ready for analysis of hyperparameters

Return type:

emulator, GaussianProcessEmulatorMCMC

create_linear_model_emulator(model_values: ModelValues) LinearModelEmulator[source]

Creates an individual emulator for an individual scaling relation described by the provided model_values.

Parameters:
  • model_values – The model values structure for this given scaling relation. This specifies the training data for the emulator.

  • ModelValues – The model values structure for this given scaling relation. This specifies the training data for the emulator.

Returns:

The built and trained emulator ready for prediction steps.

Return type:

emulator, LinearModelEmulator