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 detection;
33pub mod distribution;
34pub mod msa;
35pub mod point_process;
36pub mod regression;
37pub mod seasonality;
38pub mod smoothing;
39pub mod spc;
40pub mod testing;
41pub mod weibull;
42
43/// The JSON wire contract shared by the `ffi` and `wasm` transports.
44#[cfg(any(feature = "ffi", feature = "wasm"))]
45mod wire;
46
47#[cfg(feature = "wasm")]
48pub mod wasm;
49
50#[cfg(feature = "ffi")]
51pub mod ffi;
52
53// The README's Rust examples are the first code most users copy, so they are
54// compiled and run with the doc-tests. Without this they were checked by
55// nothing, and one stopped compiling when a constructor began returning
56// `Result` without any test noticing.
57#[cfg(doctest)]
58#[doc = include_str!("../README.md")]
59pub struct ReadmeDoctests;