To get started, here is a link to the original gp_extras package which should be installed along with scikit-learn (sklearn). These packages and scripts in this repository are developed with Python 3 compatibility, and installation is as simple as
git clone git@github.com:scikit-learn/scikit-learn.git
cd sklearn
python setup.py install
and
git clone git@github.com:jmetzen/gp_extras.git
cd gp_extras
python setup.py install
The multidimensional adaptive Gaussian process code is applied on experimental data with a few examples of potential outputs displayed below. Corresponding codes necessary for the creation of similar plots can be found here. One example capability of this tool is the fitting of noisy multidimensional data as visualized below for both electron density and temperature measurements. This can yield time-varying plasma profiles and associated gradients with uncertainties.
Note for users: GP regression cannot fix the observed data, e.g. outliers at ψ < 0.95 towards the core breaking monotonicity. Good measurements with preprocessing will correspondingly help provide good fits, and the GP will help quantify what is already captured. Additionally, it is worth noting that running the same fitting routine on identical data sets can yield different results due to the stochastic optimization process employed. The script GP-train.py
is currently configured to simply keep repeating until training is successful in case the optimization has not converged. Primary inputs to modify to help with stability during training include N_clusters
, l_samples_input
, lower_l
(i.e. lower limit), and upper_l
(i.e. upper limit).
Adaptive length scales can also be further analyzed across the spatiotemporal grid using GP-obtain-2D-LLS.py
, if sought. It is worth noting that significantly different length scales can be learned across the input domain even after initializing identical adaptive kernels due to the stochastic nature of the optimization process.
As described in the original gp_extras package, the adaptive length scales and heteroscedastic noise model enable improved fitting in the above cases, and this is visually exemplified in the following 1-dimensional scenarios:
If you have any research questions or comments, please feel free to contact mathewsa@mit.edu
Note: This program is distributed in the hope that it will be useful, but without any warranty; not even the implied warranty of merchantibility or fitness for a particular service. Therefore, testing the code and ensuring it performs as you expect is important.
If you find this code useful, please remember to cite it: https://arxiv.org/abs/2103.01305
@misc{mathews2021quantifying,
title={Quantifying experimental edge plasma evolution via multidimensional adaptive Gaussian process regression},
author={Abhilash Mathews and Jerry Hughes},
year={2021},
eprint={2103.01305},
archivePrefix={arXiv},
primaryClass={physics.plasm-ph}
}
This work is supported by the U.S. Department of Energy (DOE) Office of Science under the Fusion Energy Sciences program under contract DESC0014264 and the Natural Sciences and Engineering Research Council of Canada (NSERC) by the doctoral postgraduate scholarship (PGS D) and the Alcator C-Mod team.