Skip to main content

IFE Surrogate GP

A flexible and extensible library for Gaussian Processes, built 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_filter_dataset

  from numpyro.distributions import Uniform
  import jax.numpy as jnp
  import matplotlib.pyplot as plt


  data = load_lc_filter_dataset()
  x_train_scaled = data["x_train_scaled"]
  x_test_scaled = data["x_test_scaled"]
  y_train_scaled = data["y_train_scaled"]
  y_test_scaled = data["y_test_scaled"]

  freqs = data["freqs"]


  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, freqs)

  trainer = SwarmTrainer(number_iterations=100, number_particles=10)
  best_run, history = trainer.train(model)

  predictions, variances = model.predict(x_test_scaled)


  fig, ax = plt.subplots(figsize=(10, 5))
  plt.xscale("log")
  plt.scatter(freqs, predictions[0], label="predicted")
  plt.scatter(freqs, y_test_scaled[0], label="true")
  plt.legend()
  plt.grid()
  plt.show()

Documentation


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

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

Metadata

Release files for IFE-Surrogate 0.2.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for IFE-Surrogate 0.2.7
File Size Uploaded
ife_surrogate-0.2.7.tar.gz 324.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for IFE-Surrogate 0.2.7
File Interpreter ABI Platform
ife_surrogate-0.2.7-py3-none-any.whl Python 3 none any Details

Total release size: 667.3 kB

Release files / ife_surrogate-0.2.7.tar.gz

Download URL ife_surrogate-0.2.7.tar.gz
Size 324.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2d39d4d55bb04aead9fa9f3d67e09230af89216c9eacd8efd4da25545b2e56fa
BLAKE2b-256 checksum
How to use checksums
38a8c70a69cb786c0b8c160e175245d0f0f004c12498a772c3e821682c8f9f62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.7

Release files / ife_surrogate-0.2.7-py3-none-any.whl

Download URL ife_surrogate-0.2.7-py3-none-any.whl
Size 343.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bc8e20fe1a219886159b255db5076ae0744cbd290e13f931e2de913857212696
BLAKE2b-256 checksum
How to use checksums
e45fe0c052c62241ab7115e181d7ccc1f3c059b570e5dd6db58019acae0e6122
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.7

Release history Release notifications | RSS feed

This release

0.2.7 This release

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page