pub fn impute_missing_values(
data: &FdMatrix,
argvals: &[f64],
method: ImputationMethod,
) -> Result<FdMatrix, FdarError>Expand description
Impute NaN values in a regular functional data matrix.
Returns a new FdMatrix with NaN entries replaced according to method.
Non-NaN entries are copied through unchanged.
For Linear, gaps at the curve boundary (no neighbor on one side) are
filled with the nearest valid value (boundary extension).
§Arguments
data— Functional data matrix (n × m) with possible NaN entriesargvals— Evaluation points (lengthm, must be sorted)method— Imputation strategy
§Errors
FdarError::InvalidDimensionifargvals.len() != data.ncols()FdarError::InvalidParameterif any curve consists entirely of NaN values