blr-active 0.1.0

Active learning orchestration for Bayesian Linear Regression with Automatic Relevance Determination
Documentation
use blr_core::BLRError;
use thiserror::Error;

/// Errors that can arise during active learning operations.
#[derive(Error, Debug)]
pub enum ALError {
    /// Propagated from a BLR fitting failure.
    #[error("BLR fitting error: {0}")]
    BlrError(#[from] BLRError),

    /// The requested precision goal is unachievable given the noise floor.
    #[error("Precision goal unreachable: {0}")]
    GoalUnreachable(String),

    /// Noise floor has been hit; further measurements unlikely to help.
    #[error("Noise floor detected — hardware noise is the limiting factor")]
    NoiseFloorDetected,

    /// The maximum number of active learning iterations was reached.
    #[error("Maximum iterations reached without convergence")]
    MaxIterationsReached,

    /// A calibration goal was not set before calling an operation that requires it.
    #[error("No precision goal set — call set_goal() first")]
    NoGoalSet,
}

/// Convenience alias for `Result<T, ALError>`.
pub type ALResult<T> = Result<T, ALError>;