A machine learning library intended for surrogate modeling tasks.
Project description
IFE Surrogate GP
A flexible and extensible library for Gaussian Processes, built with for performance and modularity.
Models can be trained via maximum likelihood estimation or by baysian inference.
Features
- High-performance kernels (JAX-compatible)
- Composable API for building custom models
- Multiple optimizers (Optax, Scipy, etc.)
- Built in Baysian inference of the models with NumPyro
- Automatic hyperparameter handling
- Built-in training workflows
Installation
pip install ife_surrogate
Usage
Quickstart
from ife_surrogate.gp.kernels import Kriging
from ife_surrogate.gp.models import WidebandGP
from ife_surrogate.gp.trainers import SwarmTrainer
from ife_surrogate.utils.datasets import load_lc_dataset
dataset = load_lc_dataset()
x_train_scaled = data["x_train_scaled"]
x_test_scaled = data["x_test_scaled"]
y_train_scaled = data["y_train_scaled"]
d = x_train_scaled.shape[1]
priors = {"lengthscale": Uniform(1e-0, 1e1), "power": Uniform(1, 2)}
kernel = Kriging(lengthscale=jnp.ones(d), power=jnp.ones(d), priors=priors)
model = WidebandGP(x_train_scaled, y_train_scaled, kernel, f)
trainer = SwarmTrainer(number_iterations=200, number_particles=10)
best_run, history = trainer.train(model)
predictions, variances = model.predict(x_test_scaled)
Documentation
- API Reference
- [Tutorials] (Coming soon.)
Key Components
-
Kernels
- Kriging
- RBF
- Matern
- SumKernel
- ProductKernel
- Scale
- RQ
- Noise
-
Models
- WidebandGP
- ScalerGP
- WidebandTP
- ScalerTP
-
Trainers
- OptaxTrainer
- SwarmTrainer
License
Distributed under the MIT License. See LICENSE for more information.
References
The mathematical background and implementation of these models are based on the following publications:
Gaussian Process & Student-t Theory
- Gaussian Process Basics: Rasmussen, C. E., & Williams, C. K. I. (2006). Gaussian Processes for Machine Learning. MIT Press.
- Student-t Process (TP) Foundations: Shah, A., Wilson, A. G., & Ghahramani, Z. (2014). Student-t Processes as Alternatives to Gaussian Processes. Proceedings of the 17th International Conference on Artificial Intelligence and Statistics (AISTATS).
Wideband & Multi-output Modeling
- Wideband Architecture: Rezende, R. S., Hansen, J., Piwonski, A., & Schuhmann, R. (2024). Wideband Kriging for Multiobjective Optimization of a High-Voltage EMI Filter. IEEE Transactions on Electromagnetic Compatibility, 66(4), 1116–1124.
- Multi-output Separable GPs: Bilionis, I., Zabaras, N., Konomi, B. A., & Lin, G. (2013). Multi-output separable Gaussian process: Towards an efficient, fully Bayesian paradigm for uncertainty quantification. Journal of Computational Physics, 241, 212–239.
- Vector-Valued Kernels: Alvarez, M. A., Rosasco, L., & Lawrence, N. D. (2012). Kernels for Vector-Valued Functions: A Review. [cite_start]Foundations and Trends in Machine Learning.
Inference & Software Stack
- JAX: Bradbury, J., et al. (2018). JAX: Composable transformations of Python+NumPy programs.
- NumPyro: Phan, D., Pradhan, N., & Jankowiak, M. (2019). Composable Effects for Flexible and Accelerated Probabilistic Programming in NumPyro. arXiv preprint.
- Flax: Heek, J., et al. (2020). Flax: A neural network library and ecosystem for JAX.
- Optax: Babuschkin, I., et al. (2020). Optax: Composable gradient descent optimization for JAX.
- SciPy: Virtanen, P., et al. (2020). SciPy 1.0: Fundamental Algorithms for Scientific Computing in Python. Nature Methods.
- NUTS Sampler: Hoffman, M. D., & Gelman, A. (2014). The No-U-Turn sampler: adaptively setting path lengths in Hamiltonian Monte Carlo. Journal of Machine Learning Research.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ife_surrogate-0.2.6.tar.gz
(324.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
ife_surrogate-0.2.6-py3-none-any.whl
(343.0 kB
view details)
File details
Details for the file ife_surrogate-0.2.6.tar.gz.
File metadata
- Download URL: ife_surrogate-0.2.6.tar.gz
- Upload date:
- Size: 324.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f522bf76b2e08f07c642c21267fc01adac686e7d41e400c25d7242c85ca1bfc
|
|
| MD5 |
709782e063e270316c0f5eb37022cabc
|
|
| BLAKE2b-256 |
12fd908aa6ed5bc4b3fca29856a86e0ebcc087e434892ca7e4c21abfda3354c4
|
File details
Details for the file ife_surrogate-0.2.6-py3-none-any.whl.
File metadata
- Download URL: ife_surrogate-0.2.6-py3-none-any.whl
- Upload date:
- Size: 343.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71eea998403b4ca4e4ad9c9bd645030c24505ce5f408af1650ec93ef99906cba
|
|
| MD5 |
7ef4bb8a7a15ad1858d8681b6724dc56
|
|
| BLAKE2b-256 |
a6c4ae4f9ff4efadb40da08f53ae522e99aafa9c7dbf334a19caefecb7e9e9cd
|