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.1.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.1-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lightningbo-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 1b978959bc55385258569ebc431a07766e5ec615e7f390ab2f571bf3f1446bd4
MD5 ab07d8dd6b18b4ecf067186bbeb4eff4
BLAKE2b-256 3d154f56bca313028c020555be273df980ee16b705cef6c6814c81fb4b29d33b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lightningbo-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fc994a3265774a3e2d749983e393aca34daada491b4b4249f6bb95952da75b50
MD5 fee965f6fac24aa4afd7422e04481f3b
BLAKE2b-256 b938be8d4af56a8ca5af320c52fb8203ff6676343b7b37ad3147cc31b9a80473

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