blr-active: Active Learning Orchestration for Sensor Calibration
4-phase active learning workflow for noise-aware, precision-targeted sensor calibration.
Overview
blr-active implements a 4-phase active learning workflow for precision-targeted sensor calibration,
built on top of the blr-core crate's Bayesian Linear Regression with Automatic Relevance Determination.
blr-core (pure BLR+ARD math)
└── blr-active (this crate: active learning loop, precision tiers)
Features
- ✓ 4-Phase Calibration Workflow: Noise characterisation → exploration → active learning → completion
- ✓ Noise-Aware Precision Tiers: Map sensor noise floor to realistic precision goals (Low/Moderate/High/Max)
- ✓ 5 Active Learning Algorithms: Variance sampling, mutual information, goal-based, noise-floor detection
- ✓ Feasibility Assessment: Predicts whether a precision goal is achievable before collecting data
- ✓ Session History Export: JSON export of all measurements, precision records, and convergence data
- ✓ Zero panics on valid input: All errors returned as
ALError
Installation
[]
= "0.1"
= "0.1" # required for BLR+ARD fitting
Quick Start: Noise Characterisation
use ;
use estimate_noise_with_confidence;
// After an initial fit on 15 calibration points (beta from blr-core):
let noise_est = estimate_noise_with_confidence;
let mut noise_session = new;
// Inspect precision tiers
for tier in noise_session.precision_tiers
// Set precision goal
noise_session.set_goal.expect;
Quick Start: Active Learning Loop
use ;
let config = default;
let mut session = new;
// Seed with initial measurements
for in initial_data
loop
The 4-Phase Workflow
| Phase | Component | Description |
|---|---|---|
| 0 | NoiseCalibrationSession |
Noise characterisation → choose precision tier |
| 1 | CalibrationSession |
Initial data collection across sensor range |
| 2 | CalibrationSession::next_iteration() |
Active sample selection → converge |
| 3 | export_history_json() |
Store calibration results and provenance |
Precision Tiers
| Tier | Factor × σ_noise | Est. samples | Use case |
|---|---|---|---|
| Low | 5.0× | ~10 | Rapid commissioning |
| Moderate | 3.0× | ~25 | Typical production calibration |
| High | 1.5× | ~60 | Demanding applications |
| Max | 1.0× | ~200 | Theoretical sensor limit |
Algorithm Summary
| Module | Algorithm | Description |
|---|---|---|
active_learning::variance |
Alg. 1 | Posterior variance computation |
active_learning::acquisition |
Alg. 2 | Variance-maximizing acquisition |
active_learning::precision |
Alg. 3 | Precision assessment and goal checking |
active_learning::noise_floor |
Alg. 4 | Noise floor (plateau) detection |
active_learning::orchestration |
Alg. 5 | Synchronous calibration state machine |
Examples
Compatibility
- Rust: 1.70+
- Platforms: Linux, macOS, Windows, WebAssembly (WASI Preview 2)
- License: Apache 2.0
References
- Settles, B. (2009). "Active Learning Literature Survey." UW-Madison TR 1648.
- MacKay, D. J. C. (1992). "Information-Based Objective Functions for Active Data Selection." Neural Computation, 4(4), 590–604.
- Tipping, M. E. (2001). "Sparse Bayesian Learning and the Relevance Vector Machine." JMLR, 1, 211–244.
License
Licensed under the Apache License, Version 2.0. See LICENSE for details.
Contributing
Contributions are welcome. Please ensure:
- All tests pass:
cargo test -p blr-active - Documentation is updated:
cargo doc -p blr-active --no-deps --open - Code follows project conventions (see blr-core for style reference)