Expand description
Probability, descriptive and robust benchmark statistics, deterministic clustering, streaming quantiles, finite Markov and hidden-state sequence inference, and fairness helpers for number-domain data.
Descriptive statistics and disparate-impact helpers also expose Claim
surfaces. The Claim values carry their subject, predicate, and evidence table
as inspectable runtime data, so callers can browse both the computed metric
and the inputs used to justify it. fit_markov keeps the finite vocabulary,
exact counts, additive smoothing, held-out likelihood, deterministic
serialization, and corpus provenance inspectable instead of hiding learned
weights. QuantileSketch makes rank error and retained memory explicit;
forward_backward, viterbi, and fit_hmm keep normalization,
convergence, bounded work, numerical repair, and termination evidence.
fit_kmeans and fit_gmm add seeded initialization, bounded convergence,
regularized covariance, singular-component policy, and model-selection
evidence without taking ownership of sequence alignment.
median_absolute_deviation and bootstrap_mean_difference_interval
serve benchmark dispersion and comparison policy without duplicating
statistical formulas in tooling.
Structs§
- Binary
Outcome Counts - Counts for a binary selection or outcome table.
- Bootstrap
Control - Controls a deterministic bootstrap of the candidate-minus-baseline mean.
- Bootstrap
Effect Interval - A percentile bootstrap interval for the candidate-minus-baseline mean.
- Corpus
Provenance - Stable provenance attached to every fitted transition model.
- Disparate
Impact - Disparate-impact summary for two binary-outcome groups.
- Fairness
Claim Value - A first-class runtime object wrapping the fairness Claim and its evidence.
- Fairness
Evidence - Evidence carried by the disparate-impact fairness Claim.
- Finite
Transition Matrix - A finite state vocabulary and row-stochastic transition matrix.
- Forward
Backward - Normalized forward, backward, and smoothed posterior state probabilities.
- GmmControl
- Deterministic convergence and work policy for Gaussian-mixture EM.
- GmmEvidence
- Convergence, regularization, work, and selection evidence from EM.
- GmmModel
- Inspectable fitted Gaussian-mixture parameters.
- GmmReport
- Fitted mixture and complete EM evidence.
- GmmSpec
- Component count, covariance family, regularization, and singular policy.
- Hidden
Markov Model - A finite hidden Markov model with inspectable transition and emission rows.
- HmmFit
Control - Deterministic initialization, convergence, and work policy for Baum-Welch.
- HmmFit
Evidence - Convergence, likelihood, repair, seed, and termination evidence.
- HmmFit
Report - A fitted hidden-state model together with complete termination evidence.
- Inference
Evidence - Numerical and likelihood evidence from normalized sequence inference.
- KMeans
Control - Deterministic initialization, convergence, restart, and work policy for k-means.
- KMeans
Model - Inspectable k-means centroids and stable cluster assignments.
- KMeans
Report - Selected model and complete multi-restart evidence.
- KMeans
Restart Evidence - Convergence evidence for one bounded restart.
- Markov
Model - A finite first-order Markov model retaining exact counts and fitting policy.
- Markov
Policy - Explicit fitting and evaluation policy for a finite first-order model.
- Model
Report - A fitted value together with training and held-out evidence.
- Model
Selection Evidence - AIC and BIC evidence for comparing fitted component counts.
- Posterior
Path - Per-position maximum-posterior state path.
- Quantile
Estimate - One quantile estimate together with its retained rank evidence.
- Quantile
Policy - Error and memory policy for a
QuantileSketch. - Quantile
Sketch - A deterministic Greenwald-Khanna streaming quantile summary.
The sketch stores observations exactly through
QuantilePolicy::exact_threshold. Larger streams use rank intervals and deterministic compression. Compatible sketches can be merged without replaying their source streams. The hard entry limit makes memory admission explicit: an operation that cannot retain the requested rank error is rejected transactionally. - Stats
Claim Evidence - Evidence carried by a descriptive statistics Claim.
- Stats
Claim Value - A first-class runtime object wrapping a descriptive statistics Claim.
- Stats
Numbers Lib - Library that installs the runtime statistics functions.
- Transition
Score - Aggregate likelihood evidence for a collection of state sequences.
- Viterbi
Path - Maximum-probability hidden-state path and its joint log probability.
Enums§
- Clustering
Error - Errors returned by clustering and mixture-model fitting.
- Covariance
Type - Covariance representation fitted for every Gaussian component.
- Emission
Model - Discrete or scalar Gaussian emissions for a finite hidden-state model.
- Gaussian
Covariance - Inspectable covariance parameters for one Gaussian component.
- GmmTermination
- Why bounded EM stopped.
- HmmError
- Failure while constructing, fitting, or running hidden-state inference.
- HmmSpec
- Hidden-state and emission family requested from
fit_hmm. - HmmTermination
- Why bounded Baum-Welch stopped.
- KMeans
Search Termination - Why the bounded multi-restart search stopped.
- KMeans
Termination - Why one k-means restart stopped.
- Markov
Error - Failure while validating, fitting, scoring, or serializing a Markov model.
- Quantile
Error - Failure while configuring, updating, merging, or querying a quantile sketch.
- Sequence
- One homogeneous observation sequence accepted by HMM fitting.
- Singular
Component Policy - Policy for an EM component with negligible responsibility or singular covariance.
- Stats
Error - Errors returned by probability, statistics, and fairness helpers.
- Transition
Error - Failure while constructing a finite row-stochastic transition matrix.
Statics§
- RECIPES
- Cookbook recipes for this lib, embedded at build time.
Traits§
- HmmObservation
- Observation accepted by generic HMM inference.
Functions§
- bayesian_
update - Computes
prior * likelihood / evidenceand validates the posterior. - bayesian_
update_ binary - Computes a binary-test posterior from prior, true-positive, and false-positive rates.
- bootstrap_
mean_ difference_ interval - Bootstraps the difference between candidate and baseline arithmetic means.
- disparate_
impact - Computes disparate impact and the four-fifths pass/fail flag.
- entropy
- Computes Shannon entropy in bits for a probability vector that sums to one.
- exact_
quantile - Computes the exact linearly interpolated quantile of finite small data.
- fairness_
claim - Builds the public disparate-impact fairness Claim and interns its evidence object.
- fairness_
claim_ value - Wraps a fairness Claim as a runtime value.
- fit_gmm
- Fits a regularized diagonal or full-covariance Gaussian mixture.
- fit_hmm
- Fits a discrete- or continuous-emission HMM with bounded Baum-Welch.
- fit_
kmeans - Fits deterministic seeded k-means with k-means++ initialization.
- fit_
markov - Fits an inspectable finite first-order model and reports held-out evidence.
- fnv1a64
- Computes a stable FNV-1a digest for small transparent fixture corpora.
- forward_
backward - Runs normalized forward/backward inference in the log domain.
- four_
fifths_ ratio - Computes the comparison/reference rate ratio used by the four-fifths rule.
- mean
- Computes the arithmetic mean of finite values.
- median_
absolute_ deviation - Computes the raw median absolute deviation from the sample median.
- population_
variance - Computes population variance with divisor
n. - posterior_
decode - Decodes the independently most probable hidden state at each position.
- sample_
variance - Computes sample variance with divisor
n - 1. - stats_
claims_ symbol - Returns the symbol bound to the
stats/claimsbatch operation. - stats_
disparate_ impact_ claim_ symbol - Returns the symbol bound to the
stats/disparate-impact-claimoperation. - stats_
entropy_ claim_ symbol - Returns the symbol bound to the
stats/entropy-claimoperation. - stats_
gmm_ symbol - Returns the symbol bound to regularized Gaussian-mixture EM.
- stats_
kmeans_ symbol - Returns the symbol bound to deterministic bounded k-means.
- stats_
mean_ claim_ symbol - Returns the symbol bound to the
stats/mean-claimoperation. - stats_
result_ claim - Builds the public descriptive statistics Claim and interns its evidence object.
- stats_
result_ claim_ value - Wraps a descriptive statistics Claim as a runtime value.
- stats_
variance_ claim_ symbol - Returns the symbol bound to the
stats/variance-claimoperation. - variance
- Computes population variance.
- viterbi
- Finds the maximum joint-probability hidden-state path in the log domain.
Type Aliases§
- StateId
- Stable numeric hidden-state identifier produced by
fit_hmm. - Stats
Result - Result alias for the statistics helpers, fixing the error to
StatsError.