Skip to main content

Module wire

Module wire 

Source
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§

AlignmentLayer
Elastic alignment result.
ClusterLayer
Cluster assignments.
CustomLayer
User-defined layer for extensions.
DepthLayer
Functional depth scores.
DistancesLayer
Precomputed n×n distance matrix with method metadata.
ExplainLayer
Explainability result.
FdaData
Unified FDA data object for pipeline interchange.
FosrLayer
Function-on-scalar regression fit.
FpcaLayer
FPCA decomposition.
GroupVar
Named grouping variable with string labels.
MeanLayer
Mean curve.
NamedVec
A named vector of f64 values (e.g., a scalar covariate or response).
OutlierLayer
Outlier detection result.
PlsLayer
PLS decomposition.
RegressionLayer
Scalar-on-function regression fit.
SpmChartLayer
SPM Phase I chart.
SpmMonitorLayer
SPM Phase II monitoring result.
ToleranceLayer
Tolerance / confidence band.

Enums§

Layer
Analysis result attached to an FdaData.
LayerKey
Key identifying a layer type.

Type Aliases§

CustomData
Custom layer data type (flat map when serde is disabled).
ExplainExtra
Extra data for explain layers (flat map when serde is disabled).