npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@wlearn/bo

v0.1.0

Published

Bayesian optimization with Gaussian processes for hyperparameter tuning

Downloads

75

Readme

@wlearn/bo

Bayesian optimization with Gaussian processes for hyperparameter tuning. Part of the wlearn ecosystem.

C11 core compiled to WebAssembly. All BO policy (GP fitting, acquisition optimization, categorical Thompson sampling, per-context GPs) runs in native code. JS wrapper is a thin translation layer.

Install

npm install @wlearn/bo

Usage

Standalone optimizer

const { BayesianOptimizer, loadBO } = require('@wlearn/bo')

await loadBO()

const optimizer = await BayesianOptimizer.create({
  learningRate: { type: 'log_uniform', low: 1e-4, high: 1.0 },
  nLayers: { type: 'int_uniform', low: 1, high: 5 },
  activation: { type: 'categorical', values: ['relu', 'tanh', 'gelu'] },
}, { seed: 42 })

for (let i = 0; i < 50; i++) {
  const params = optimizer.suggest()
  const score = evaluate(params)  // your objective function
  optimizer.observe(params, score)
}

console.log('Best score:', optimizer.bestScore)
optimizer.dispose()

With AutoML

const { autoFit } = require('@wlearn/automl')

const result = await autoFit(models, X, y, {
  strategy: 'bayesian',
  nIter: 30,
})

Search space types

| Type | Description | Example | |------|-------------|---------| | uniform | Continuous uniform | { type: 'uniform', low: 0, high: 1 } | | log_uniform | Log-uniform continuous | { type: 'log_uniform', low: 1e-5, high: 1 } | | int_uniform | Integer uniform | { type: 'int_uniform', low: 1, high: 100 } | | int_log_uniform | Log-uniform integer | { type: 'int_log_uniform', low: 10, high: 1000 } | | categorical | Categorical choice | { type: 'categorical', values: ['a', 'b'] } |

Conditional parameters are supported via condition:

{
  algo: { type: 'categorical', values: ['svm', 'rf'] },
  C: { type: 'log_uniform', low: 0.01, high: 100, condition: { algo: 'svm' } },
  nTrees: { type: 'int_uniform', low: 10, high: 500, condition: { algo: 'rf' } },
}

Options

| Option | Default | Description | |--------|---------|-------------| | kernel | 'matern52' | GP kernel: 'matern52', 'matern32', 'se' | | acquisitionFn | 'ei' | Acquisition function: 'ei', 'ucb', 'pi' | | kappa | 2.0 | UCB exploration weight | | xi | 0.01 | EI/PI exploration jitter | | seed | 42 | Random seed for reproducibility | | maxObs | 500 | Observation reservoir cap |

License

Apache-2.0