Skip to content
Back to skills

Bayesian Optimization

ASecurity

"Guides modAL BayesianOptimizer and PI/EI/UCB acquisition workflows

  • 247 stars
  • 0 votes
  • 3 copies
  • 8 views
  • Added September 8, 2026
business

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill bayesian-optimization --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Bayesian Optimization?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Bayesian Optimization
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-bayesian-optimization-arex-skill/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-bayesian-optimization-arex-skill)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: bayesian-optimization
description: "Guides modAL BayesianOptimizer and PI/EI/UCB acquisition workflows
  for expensive scalar-function optimization with GP-style regressors."
disable-model-invocation: true
metadata:
  disco-role: operating
license: MIT
---

# Bayesian Optimization

Use this sub-skill when a task asks for Bayesian optimization with modAL: build a `BayesianOptimizer`, choose PI/EI/UCB acquisition behavior, run a bounded objective-evaluation loop, inspect acquisition scores, or debug `get_max()`/`y_max` tracking.

## Read or run first

- Read [references/workflows.md](references/workflows.md) when you need an end-to-end optimizer loop, shape conventions, 1-D or multidimensional candidate grids, or evaluation-budget guidance.
- Read [references/acquisition-reference.md](references/acquisition-reference.md) when choosing among `max_PI`, `max_EI`, `max_UCB` or inspecting `optimizer_PI`, `optimizer_EI`, `optimizer_UCB` score arrays.
- Read [references/troubleshooting.md](references/troubleshooting.md) when `teach`, `query`, acquisition utilities, `predict(return_std=True)`, or `get_max()` behave unexpectedly.
- Run [scripts/bayesian_optimizer_smoke.py](scripts/bayesian_optimizer_smoke.py) to check that the installed `modAL` package can execute a deterministic Bayesian optimization loop and print `PASS` with `get_max()` results.

## Route boundaries

- For general `ActiveLearner`, `Committee`, `query`, `teach`, `fit`, `return_metrics`, bagging, or estimator lifecycle questions, route to [../learners-and-committees/SKILL.md](../learners-and-committees/SKILL.md).
- For generic query strategy selection, custom strategy combinators, uncertainty/disagreement sampling, ranked batch, density, expected-error, or multilabel strategies, route to [../query-strategies/SKILL.md](../query-strategies/SKILL.md).
- Keep this sub-skill focused on scalar-objective maximization with regressors that can provide both predictive mean and predictive standard deviation.

## Minimal operating checklist

1. Define a finite candidate pool `X_pool` with shape `(n_candidates, n_features)`.
2. Seed `BayesianOptimizer` with at least one evaluated point: `X_training` has matching feature columns and `y_training` contains numeric scalar objective values.
3. Use a regressor whose `predict(X, return_std=True)` returns `(mean, std)`; `GaussianProcessRegressor` is the usual modAL-backed choice.
4. Query before evaluating the expensive objective: `query_idx, query_inst = optimizer.query(X_pool)`.
5. Evaluate only `query_inst`, normalize the result to one scalar per queried row, and call `optimizer.teach(query_inst, y_new)`.
6. Call `optimizer.get_max()` for the best observed location/value so far; do not recompute the maximum from unevaluated candidate predictions.

Files in this skill

  • SKILL.md2.7 KB
  • references/acquisition-reference.md7.1 KB
  • references/troubleshooting.md5.8 KB
  • references/workflows.md6.6 KB
  • scripts/bayesian_optimizer_smoke.py9.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.