pub fn gauss_model(
karcher: &KarcherMeanResult,
argvals: &[f64],
ncomp: usize,
n_samples: usize,
seed: u64,
) -> Result<GenerativeModelResult, FdarError>Expand description
Generate random curves from a fitted Gaussian model on aligned data.
Samples amplitude and phase components independently from their respective FPCA score distributions (Gaussian with covariance = diag(eigenvalues)), then combines them to produce synthetic functional data.
§Arguments
karcher— Pre-computed Karcher mean result (with aligned data and gammas)argvals— Evaluation points (length m)ncomp— Number of principal components for both amplitude and phasen_samples— Number of curves to generateseed— RNG seed for reproducibility
§Errors
Returns FdarError::InvalidDimension if dimensions are inconsistent or
FdarError::ComputationFailed if FPCA fails.