Skip to main content

LightningBO: JAXベースの高速ベイジアン最適化ライブラリ。ハイパーパラメータ探索やマーケティング最適化に最適。EI/PI/UCB/LCB獲得関数、ガウス過程、JIT高速化、メモリ効率設計。

Project description

LightningBO

LightningBOは、ベイズ最適化(Bayesian Optimization)を簡単に実装・拡張できるPythonライブラリです。 本ライブラリは、ブラックボックス関数の最適化やハイパーパラメータ探索など、試行回数を抑えつつ効率的に最適解を見つけたい場面で活用できます。

特徴

  • JAXベースの高速な計算
  • 連続・離散パラメータ両対応
  • 期待値改善(EI)などの獲得関数
  • 拡張性の高い設計

使い方例

import LightningBO.bayesian_optimization as bo
import LightningBO.bayesian_core as bc

# 最適化したい関数
def f(x):
	return x**2 - 4*x + 5

# 探索空間の定義
domain = {"x": bc.Continuous(-10, 10)}

# Optimizerの作成
optimizer = bo.Optimizer(domain=domain, maximize=False)

# 初期点
params = {"x": [0.0, 2.0, 5.0]}
ys = [f(x) for x in params["x"]]
state = optimizer.init(ys, params)

# 最適化ループ
for step in range(20):
	new_params = optimizer.sample(None, state)
	y = f(**new_params)
	state = optimizer.fit(state, y, new_params)

print("最適値:", state.best_score)
print("最適パラメータ:", state.best_params)

主な用途

  • 機械学習モデルのハイパーパラメータ最適化
  • 実験・シミュレーションのパラメータ探索
  • その他ブラックボックス関数の最適化

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

lightningbo-0.1.2.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

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

lightningbo-0.1.2-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file lightningbo-0.1.2.tar.gz.

File metadata

  • Download URL: lightningbo-0.1.2.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for lightningbo-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1aa0a2d36c9f38716af89dee72bdb3a8f5bf3a455e4705cecf96f576ef40ade1
MD5 df870882edca27360030b6dfd13496ac
BLAKE2b-256 8cc567aa62223ea5bf83d7028fd076cf2df8bbd1e899fc98896868e3cfa8b54a

See more details on using hashes here.

File details

Details for the file lightningbo-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: lightningbo-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for lightningbo-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 022e9134f190d56794a0405755fd4d3172abbdb9de349d21d2a521a33892a044
MD5 8cf4b1800764275a9d3b4a4937a89843
BLAKE2b-256 1d072509b9134ee0b42787388babef9aaefff6a1aa10ead531411e7eee9e1feb

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