Skip to main content

add_error_curve

Function add_error_curve 

Source
pub fn add_error_curve(
    data: &[f64],
    n: usize,
    m: usize,
    sd: f64,
    seed: Option<u64>,
) -> Vec<f64>
Expand description

Add curve-level Gaussian noise to functional data.

Adds a constant noise term per curve: each observation in curve i has the same noise value.

§Arguments

  • data - Data matrix (n × m) in column-major format
  • n - Number of samples
  • m - Number of evaluation points
  • sd - Standard deviation of noise
  • seed - Optional random seed

§Returns

Noisy data matrix (n × m) in column-major format