1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! # u-insight
//!
//! Statistical analysis and data profiling engine with C FFI bindings.
//!
//! u-insight transforms raw tabular data into actionable statistical
//! insights. It operates in two distinct layers:
//!
//! - **Profiling** — tolerates dirty data, reports data quality and statistics
//! - **Analysis** — requires clean data, discovers patterns and relationships
//!
//! ## Modules
//!
//! - [`dataframe`] — Column-major tabular data model (DataFrame, Column, DataType)
//! - [`csv_parser`] — CSV parsing with automatic type inference
//! - [`json_parser`] — JSON parsing with automatic type inference
//! - [`profiling`] — Column-level and dataset-level data profiling
//! - [`analysis`] — Correlation (Pearson/Spearman), regression (simple/multiple OLS), Cramér's V
//! - [`clustering`] — K-Means++ (auto-K, Gap Statistic), Mini-Batch K-Means, DBSCAN, Hierarchical (4 linkages), HDBSCAN
//! - [`distribution`] — ECDF, histogram, QQ-plot, normality tests (KS, JB, Shapiro-Wilk, Anderson-Darling), Grubbs, distribution fitting
//! - [`pca`] — Principal Component Analysis (dimensionality reduction)
//! - [`isolation_forest`] — Isolation Forest anomaly detection (Liu et al. 2008)
//! - [`lof`] — Local Outlier Factor (LOF) density-based anomaly detection
//! - [`mahalanobis`] — Mahalanobis distance multivariate outlier detection
//! - [`feature_importance`] — Composite importance, ANOVA F-test, Mutual Information, Permutation Importance
//! - [`ffi`] — C FFI bindings (32 functions, 20 structs, auto-generated C header via cbindgen)
//! - [`error`] — Error types
//!
//! ## Quick Start
//!
//! ```
//! use u_insight::csv_parser::CsvParser;
//! use u_insight::dataframe::DataType;
//!
//! let csv = "name,value,active\nAlice,1.5,true\nBob,2.3,false\nCharlie,3.1,true\n";
//! let df = CsvParser::new().parse_str(csv).unwrap();
//!
//! assert_eq!(df.row_count(), 3);
//! assert_eq!(df.column_count(), 3);
//!
//! // Type inference: name=Text, value=Numeric, active=Boolean
//! let schema = df.schema();
//! assert_eq!(schema[1].1, DataType::Numeric);
//! assert_eq!(schema[2].1, DataType::Boolean);
//! ```