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
64
65
66
67
68
69
70
//! Functional Data Analysis (FDA) for time series
//!
//! This module provides a comprehensive suite of methods for functional data analysis,
//! treating time series observations as realizations of smooth random functions.
//!
//! # Sub-modules
//!
//! - [`basis`]: Basis function systems (B-splines, Fourier, Wavelets, Monomials)
//! - [`smoothing`]: Functional data smoothing (penalized LS, kernel, spline)
//! - [`fpca`]: Functional Principal Component Analysis and variants
//! - [`regression`]: Functional regression models (FLM, FoS, Concurrent, ANOVA)
//!
//! # Key Concepts
//!
//! In FDA, each observation is treated as a function x_i: [a,b] → ℝ rather than a
//! finite-dimensional vector. The workflow typically consists of:
//!
//! 1. **Basis expansion**: Represent each curve as c_i^T Φ(t) using a basis system Φ
//! 2. **Smoothing**: Estimate c_i from noisy discrete observations via penalized LS
//! 3. **Analysis**: Apply FPCA, regression, or ANOVA to the smooth curves
//!
//! # Quick Start
//!
//! ```rust,no_run
//! use scirs2_series::functional::basis::BSplineBasis;
//! use scirs2_series::functional::smoothing::SplineSmoother;
//! use scirs2_series::functional::fpca::{FPCA, FPCAConfig};
//! use scirs2_core::ndarray::Array1;
//!
//! // Create observation data
//! let t = Array1::from_vec((0..50).map(|i| i as f64 / 49.0).collect());
//! let y = t.mapv(|x| x.sin() + 0.1 * x.cos());
//!
//! // Smooth with cubic spline
//! let smoother = SplineSmoother::default();
//! let fd = smoother.fit(&t, &y).expect("smoothing failed");
//!
//! // Evaluate at any point
//! let val = fd.eval(0.5).expect("evaluation failed");
//!
//! // Perform FPCA on a collection of curves
//! let t_list = vec![t.clone()];
//! let y_list = vec![y.clone()];
//! // (in practice, use many observations)
//! ```
// Re-export key types for convenient access
pub use ;
pub use ;
pub use ;
pub use ;