Emulators, or emus for short, are models that mimic the output of more complex models or simulations; like the giant Australian birds, these emus are fast, powerful, and ready for a fight.
In the the_great_emu_fight.ipynb we'll teach you what an emulator is, and show you how to build emulators with various methods and frameworks. We will then pit our emus against each other; may the best emu win!
Imagine that you have expensive simulations that you cannot easily repeat, as they are very slow or complex. An emulator can be trained on a relatively small set of input model parameters, and learn the relationship between the corresponding output results of the simulation. The emulator can then used to approximate the simulation output for any input parameters. This is particularly useful in inference problems to more fully explore the parameter space.
Emulators have found widespread use in astronomy. See the papers below for some examples from different areas!
- Schmit & Pritchard 2017, "Emulation of reionization simulations for Bayesian inference of astrophysics parameters using neural networks"
- McClintock et al. 2018, "The Aemulus Project II: Emulating the Halo Mass Function"
- Mijolla et al. 2019, "Incorporating astrochemistry into molecular line modelling via emulation"
- Rogers et al. 2019, "Bayesian emulator optimisation for cosmology: application to the Lyman-alpha forest"
- Wang et al. 2020, "ECoPANN: A Framework for Estimating Cosmological Parameters Using Artificial Neural Networks"
- Alsing et al. 2020, "SPECULATOR: Emulating stellar population synthesis for fast and accurate galaxy spectra and photometry"
- Pellejero-Ibanez et al. 2020, "Cosmological parameter estimation via iterative emulation of likelihoods"
Are you interested in pitting your emulator against ours? Or adding a new dataset to emulate? Feel free to submit a pull request!
Here are instructions on how to contribute a new emulator:
-
Fork the repo and checkout a new branch. Follow these instructions to make your own fork, and start a new branch for your changes.
-
Write a standalone notebook tutorial. Follow the template at
template_method_stand_alone.ipynbto construct your emulator and try it out on our training and test datasets. Include a short description of the method. -
Add your method in the emulator.py file. Go the function
trainin the emulator class. As the example below, add a keyword for theregressor_namevariable and a function for your training method.
def train(self, regressor_name, scale=True, **kwargs): if regressor_name == "DTree": train_func = self.train_decision_tree_regressor
- Add the training function. Write a function that takes the inputs
xand outputsy, and returns the training model (which is assumed to have apredictmethod). For example:
def train_decision_tree_regressor(self, x, y, scale=False): model = DecisionTreeRegressor(random_state=0, criterion="mae").fit(x, y) return model
-
Throw your emu into the fighting ring. Add your emulatior into
the_great_emu_fight.ipynb, following the format of the other emulators in section 2.C. Then run your code and compare the results to the other emus in section 3. -
Submit a pull request. Continue following these instructions to request to merge in your changes. Happy fighting!
This project was initiated at AstroHackWeek 2020, by the emu-fight team:
- Kate Storey-Fisher (New York University)
- Catarina Alves (University College London)
- Johannes Heyl (University College London)
- Yssa Camacho-Neves (Rutgers University)
- Johnny Esteves (University of Michigan)
