Skip to main content

u_analytics/
lib.rs

1//! # u-analytics
2//!
3//! Statistical process control (SPC), process capability analysis, Weibull
4//! reliability, and change-point detection.
5//!
6//! This crate provides industrial quality analysis tools that are
7//! domain-agnostic — they operate on raw `f64` data without knowledge
8//! of manufacturing, scheduling, or any specific consumer domain.
9//!
10//! ## Modules
11//!
12//! - [`spc`] — Control charts (X̄-R, X̄-S, I-MR, P, NP, C, U) with run rules
13//! - [`capability`] — Process capability indices (Cp, Cpk, Pp, Ppk, Cpm)
14//! - [`weibull`] — Weibull parameter estimation (MLE, MRR) and reliability analysis
15//! - [`detection`] — Change-point detection (CUSUM, EWMA, PELT)
16//! - [`smoothing`] — Time series smoothing (SES, Holt, Holt-Winters)
17//! - [`seasonality`] — Periodogram and dominant-period estimation (AutoPeriod)
18//! - [`correlation`] — Correlation analysis (Pearson, Spearman, Kendall, matrices)
19//! - [`regression`] — Regression analysis (simple, multiple OLS, VIF)
20//! - [`distribution`] — Distribution analysis (ECDF, histogram bins, QQ-plot, KS test)
21//! - [`testing`] — Hypothesis testing (t-tests, ANOVA, chi-squared, normality)
22//! - [`msa`] — Measurement System Analysis (Gage R&R, ANOVA method)
23//!
24//! ## Design Philosophy
25//!
26//! - **Domain-agnostic**: No manufacturing or process-specific types
27//! - **Numerical stability**: Leverages `u-numflow` for stable statistics
28//! - **Research-backed**: All algorithms reference academic literature
29
30pub mod capability;
31pub mod correlation;
32pub mod counter;
33pub mod detection;
34pub mod distribution;
35pub mod msa;
36pub mod point_process;
37pub mod regression;
38pub mod seasonality;
39pub mod smoothing;
40pub mod spc;
41pub mod testing;
42pub mod weibull;
43
44/// The JSON wire contract shared by the `ffi` and `wasm` transports.
45#[cfg(any(feature = "ffi", feature = "wasm"))]
46mod wire;
47
48#[cfg(feature = "wasm")]
49pub mod wasm;
50
51#[cfg(feature = "ffi")]
52pub mod ffi;
53
54// The README's Rust examples are the first code most users copy, so they are
55// compiled and run with the doc-tests. Without this they were checked by
56// nothing, and one stopped compiling when a constructor began returning
57// `Result` without any test noticing.
58#[cfg(doctest)]
59#[doc = include_str!("../README.md")]
60pub struct ReadmeDoctests;