Expand description
Unified FDA data container for pipeline interchange.
FdaData is a single layered container that flows between pipeline nodes.
Nodes read from existing layers and add new ones — data is additive, never
destructive. This replaces per-type wire enums with a composable structure.
§Design
- Core: curves (FdMatrix) + argvals + metadata (grouping, scalars)
- Layers: optional analysis results keyed by
LayerKey - Nodes declare what they require via
require_*helpers - Nodes add results via
set_layer - Layers compose: FPCA + Depth + Outliers can all coexist on one
FdaData
§Example
use fdars_core::wire::*;
use fdars_core::matrix::FdMatrix;
let mut fd = FdaData::from_curves(
FdMatrix::zeros(10, 50),
(0..50).map(|i| i as f64 / 49.0).collect(),
);
// A depth node reads curves, adds a Depth layer
let scores = vec![0.5; 10];
fd.set_layer(LayerKey::Depth, Layer::Depth(DepthLayer {
scores,
method: "fraiman_muniz".into(),
}));
// Downstream node checks what's available
assert!(fd.has_layer(&LayerKey::Depth));
assert!(!fd.has_layer(&LayerKey::Fpca));Structs§
- Alignment
Layer - Elastic alignment result.
- Cluster
Layer - Cluster assignments.
- Custom
Layer - User-defined layer for extensions.
- Depth
Layer - Functional depth scores.
- Distances
Layer - Precomputed n×n distance matrix with method metadata.
- Explain
Layer - Explainability result.
- FdaData
- Unified FDA data object for pipeline interchange.
- Fosr
Layer - Function-on-scalar regression fit.
- Fpca
Layer - FPCA decomposition.
- Group
Var - Named grouping variable with string labels.
- Mean
Layer - Mean curve.
- Named
Vec - A named vector of f64 values (e.g., a scalar covariate or response).
- Outlier
Layer - Outlier detection result.
- PlsLayer
- PLS decomposition.
- Regression
Layer - Scalar-on-function regression fit.
- SpmChart
Layer - SPM Phase I chart.
- SpmMonitor
Layer - SPM Phase II monitoring result.
- Tolerance
Layer - Tolerance / confidence band.
Enums§
Type Aliases§
- Custom
Data - Custom layer data type (flat map when
serdeis disabled). - Explain
Extra - Extra data for explain layers (flat map when
serdeis disabled).