/** * Bayesian fusion of numeric estimates (spec §10.1). * * Given independent, normally distributed estimates of the same quantity — * each with a mean, a σ, and an epistemic confidence acting as a weight * multiplier — the posterior is precision-weighted: * * - weighted precision: wᵢ = pᵢ / σᵢ² * - posterior mean: μ = Σ wᵢxᵢ / Σ wᵢ * - posterior σ: 1 / √(Σ wᵢ) * * The math is an implementation layer, not required syntax (spec §10) — * CAVE itself only stores claims and metadata. */ import { Claim } from '@cavelang/core'; /** One numeric estimate: finite mean, positive finite σ, confidence p ∈ [0, 1]. */ export type Estimate = { readonly mean: number; readonly sigma: number; /** Unit shared by the mean and σ. Missing is a distinct dimension. */ readonly unit?: string; /** Epistemic confidence used as a precision multiplier (default 1). */ readonly conf?: number; }; export type Posterior = { readonly mean: number; readonly sigma: number; /** Total weighted precision Σ wᵢ. */ readonly precision: number; /** Unit in which the posterior mean and σ are expressed. */ readonly unit?: string; }; /** Typed boundary failure for estimates that do not share a compatible unit. */ export declare class FusionUnitError extends Error { readonly units: readonly (string | undefined)[]; constructor(units: readonly (string | undefined)[]); } /** * Fuses finite estimates into a posterior. Zero-confidence estimates are * skipped after validating every input; invalid inputs and unrepresentable * posteriors throw instead of returning NaN or infinity. * @returns `undefined` when no estimate carries usable weight. */ export declare const fuse: (estimates: readonly Estimate[]) => undefined | Posterior; /** * @returns the estimate a claim carries, when it is numeric with `+/-` * uncertainty: mean from the payload value, σ = Δ / k (spec §7.2), * confidence from `@ N%`. `undefined` otherwise. */ export declare const estimateOf: (claim: Claim.t) => undefined | Estimate; /** * Fuses the numeric estimates found in `claims` (spec §10.1's worked * example lives in the tests). Claims without usable numeric uncertainty * are ignored. */ export declare const fuseClaims: (claims: readonly Claim.t[]) => undefined | Posterior; //# sourceMappingURL=fuse.d.ts.map