lawsynth/crates/lawsynth-uncertainty
caelum0x fb38900c67 chore(release): add version to internal path deps for publishability
Every intra-workspace dependency was declared path-only
(`{ path = "../lawsynth-X" }`), which makes `cargo publish` fail with
"all dependencies must have a version specified when publishing". Add the
uniform workspace version (`version = "0.1.0"`) alongside each `lawsynth-*`
path dep across all workspace members so each crate can be published with a
single `cargo publish`. Path is retained, so local offline builds are
unchanged (cargo prefers the path for workspace builds); this only supplies
the version metadata the registry requires. Publishing itself stays owner-
gated via release-plz (publish=false).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-06 13:06:43 +03:00
..
2026-08-16 22:04:11 +03:00
2026-08-16 22:04:11 +03:00

lawsynth-uncertainty

lawsynth-uncertainty provides deterministic, dependency-free primitives for quantifying uncertainty in a discovered law. It validates observations before calculation and returns explicit errors for undefined analyses.

It includes empirical bootstrap distributions and percentile intervals, unbiased covariance estimation, first-order (delta-method) propagation, independent empirical Monte-Carlo propagation, local quadratic profile fitting, and explainable structural uncertainty aggregation.

use lawsynth_uncertainty::{bootstrap, BootstrapConfig, Samples};

let data = Samples::new(vec![1.0, 2.0, 3.0])?;
let result = bootstrap(&data, BootstrapConfig::default(), |x| {
    x.iter().sum::<f64>() / x.len() as f64
})?;
# let _ = result;
# Ok::<(), lawsynth_uncertainty::UncertaintyError>(())

Monte-Carlo propagation treats input sample columns as independent. Preserve observed dependence by using CovarianceMatrix with linear_propagate, or resample joint rows in application code.