Skip to main content

Lightweight Gaussian Process regression library

Project description

gplite

A lightweight Gaussian Process regression library built on NumPy and SciPy, originally designed for Δ-Machine Learning.

Features

  • Gaussian Process regression with automatic hyperparameter optimization
  • Multiple kernels: RBF, Matérn, Periodic, Constant (combinable via + and *)
  • Active learning with multiple selection strategies (uncertainty, maximum absolute error, expected improvement)
  • Model saving and loading with pickle
  • Anisotropic kernels (support for per-dimension hyperparameters)
  • String export for integration with external tools

Installation

pip install gplite

or for optional dependencies to run the example files

pip install "gplite[examples]"

Quick Start

The core workflow of gplite is designed to be highly intuitive. More detailed, end-to-end examples can be found in the examples directory.

1. Standard Regression & Composable Kernels

import numpy as np
from gplite import GaussianProcess, RBFKernel, PeriodicKernel

X_train, y_train = ... # load your data

# easily combine kernels for complex data
kernel = (
    RBFKernel(length_scale=2.0) + 
    PeriodicKernel(length_scale=1.0, period=2*np.pi)
)

# fit your model and use it for predictions
gp = GaussianProcess(kernel)
gp.fit(X_train, y_train, optimize=True)

y_mean, y_std = gp.predict(X_test, return_std=True)

2. Automated Active Learning

from gplite import ActiveLearner

learner = ActiveLearner(kernel=kernel, x_full=X_full, y_full=y_full)

# automatically train the model where it is most uncertain
learner.learn(
    learning_strategy="uncertainty", 
    rmse_threshold=0.1, 
    max_points=50
)

y_pred = learner.gp.predict(X_test)

Modules

Requirements

  • Python >= 3.10
  • NumPy >= 2.2.6
  • SciPy >= 1.15.3

License

GPLv3

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

gplite-3.0.0.tar.gz (70.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gplite-3.0.0-py3-none-any.whl (83.9 kB view details)

Uploaded Python 3

File details

Details for the file gplite-3.0.0.tar.gz.

File metadata

  • Download URL: gplite-3.0.0.tar.gz
  • Upload date:
  • Size: 70.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for gplite-3.0.0.tar.gz
Algorithm Hash digest
SHA256 b1eec55b6bea4fdec4fc0cbd927b86f49f7013e97fb4717d47bfb4f681119373
MD5 7545478e8141b2faa5a961628428a72d
BLAKE2b-256 65a6a2c5d59ef563ed98306036a82b5da95d7f6f142ce6217534dc15b0ff043c

See more details on using hashes here.

File details

Details for the file gplite-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: gplite-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 83.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for gplite-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c0c9d72152a901d46b9090ec1c1f4710129df0b0f935b39b0f4fe8fe1970674f
MD5 a5a8108c716cffe3e6a47aaa0e456427
BLAKE2b-256 5abd671d2e6b846c0d3f8399df1f4517f3fe7cdc54e3f5d3be422a69ba203e08

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page