NNaPS

What is NNaPS?

Neural Network assisted Population Synthesis is a python package that wants to make it easy to perform population synthesis studies with 1D stellar evolution codes. NNaPS is developed specifically with the MESA (Modules and Experiments in Stellar Evolution) code in mind. NNaPS provides a MESA module that simplifies extracting aggregated parameters from a grid of MESA runs, and a machine learning module that can be used to create a predictive model based on the results of a grid of MESA runs. This model can then be used to perform a population synthesis study.

A typical experiment will have the following steps:

  1. Create a grid of MESA models covering the input parameter space you want to study

  2. Use nnaps-mesa to extract aggregated parameters of interest from the MESA grid, and apply the CE ejection if wanted

  3. Use the machine learning part nnaps.predictors to create a predictive model linking the input parameters of your grid to the output parameters of interest

  4. Create an input population of up to a few million models and run them through your predictive model to perform the population synthesis study.

Basic Usage

Say you have a csv file containing the starting parameter of a set of MESA models together with the observables that you are interested in. You can make a model predicting those observables in a few lines:

from nnaps import predictors

setup = {
   'datafile': <path to csv file>,
   'features': ['donor_mass', 'initial_period', 'initial_q'],
   'regressors': ['final_period', 'final_q'],
}

predictor = predictors.XGBPredictor(setup=setup)

predictor.fit()

new_predictions = predictor.predict(new_data)

Programmer Reference