Robust Gaussian process regression based on iterative trimming.
Project description
robustgp
Robust Gaussian Process Regression Based on Iterative Trimming
Zhao-Zhou Li, Lu Li, Zhengyi Shao, 2020, https://arxiv.org/abs/2011.11057
First application
- Modeling Unresolved Binaries of Open Clusters in the Color-Magnitude Diagram. I. Method and Application of NGC 3532 https://ui.adsabs.harvard.edu/abs/2020ApJ...901...49L/
Quick start
You can start with examples in this notebook.
Dependency
Install
Install the dependency first
pip install GPy
Assuming you want to put the code at certain directory, say ~/pythonlib
cd ~/pythonlib
wget https://raw.githubusercontent.com/syrte/robustgp/master/robustgp/robustgp.py
Then you can import ITGP
as following,
import sys
sys.path.append('~/pythonlib')
from robustgp import ITGP
Or add this in your .bashrc
once for all
export PYTHONPATH="$HOME/pythonlib:$PYTHONPATH"
I will write a setup.py
in the future for easier installation.
Usage
from robustgp import ITGP
# train ITGP
res = ITGP(X, Y, alpha1=0.5, alpha2=0.975, nsh=2, ncc=2, nrw=1)
gp, consistency = res.gp, res.consistency
# make prediction
y_avg, y_var = gp.predict(x_new)
y_var *= consistency
See this notebook for a complete example.
Here gp
is a GPy.core.GP
object, whose usage is illustrated here.
License
The MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
robustgp-2.0.tar.gz
(5.2 kB
view hashes)
Built Distribution
robustgp-2.0-py3-none-any.whl
(5.5 kB
view hashes)