Metadata-Version: 2.4
Name: mfmodeling
Version: 1.0.3
Summary: Multi-fidelity modeling using Gaussian process regression
Author-email: Shinya Maeyama <maeyama.shinya@nifs.ac.jp>
License: MIT License
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=2.0
Requires-Dist: torch>=2.1
Requires-Dist: gpytorch>=1.11
Provides-Extra: examples
Requires-Dist: matplotlib>=3.7; extra == "examples"
Requires-Dist: pandas>=2.0; extra == "examples"
Requires-Dist: scikit-learn>=1.2; extra == "examples"
Dynamic: license-file

# mfmodeling
Multi-fidelity modeling using Gaussian process regression

### Purpose of this project
This project is motivated to apply multi-fidelity data fusion algorithms to the regression problem in turbulent transport modeling in magnetic fusion plasma.
The developed module will be available as a general tool for multi-fidelity regression problems.

### Usage
**mfmodeling** module requires external packages: **numpy**, **GPyTorh**.

The following is an explanation on the simple usage of NARGP (Nonlinear AutoRegressive Gaussian Process regression [P. Perdikaris (2017)]) as a multi-fidelity regression algorithm. See also ```examples/NARGP_example_2d/Demo_May2024_NARGP_example_2d.ipynb```.
1. Prepare multi-fidelity datasets as a list of each fidelity data.
```
    data_list = [[data_lowfid_x,  data_lowfid_y],
                 [data_highfid_x, data_highfid_y]]
```
2. Instantiate the NARGP object using the above dataset.
```
    from mfmodeling import NARGP
    model_nargp = NARGP(data_list = data_list)
```
3. Optimize hyperparameters of the kernel function in NARGP.
```
    model_nargp.optimize()
```
4. Make a prediction.
```
    mean, var = model_nargp.prediction(x_pred)
```
where ```mean``` and ```var``` are the prediction of posterior mean and variance at your evaluating position ```x_pred```.

## Reference
[S. Maeyama, M. Honda, E. Narita, S. Toda, "Multi-Fidelity Information Fusion for Turbulent Transport Modeling in Magnetic Fusion Plasma", Scientific Reports 14, 28242 (2024).](https://doi.org/10.1038/s41598-024-78394-3)
[![doi](https://img.shields.io/badge/doi-10.1038/s41598--024--78394--3-5077AB.svg)](https://doi.org/10.1038/s41598-024-78394-3)
