Module simulation

Module simulation 

Source
Expand description

Simulation functions for functional data.

This module provides tools for generating synthetic functional data using the Karhunen-Loève expansion and various eigenfunction/eigenvalue configurations.

§Overview

Functional data can be simulated using the truncated Karhunen-Loève representation:

f_i(t) = μ(t) + Σ_{k=1}^{M} ξ_{ik} φ_k(t)

where:

  • μ(t) is the mean function
  • φ_k(t) are orthonormal eigenfunctions
  • ξ_{ik} ~ N(0, λ_k) are random scores with variances given by eigenvalues

§Eigenfunction Types

  • Fourier: sin/cos basis functions, suitable for periodic data
  • Legendre: Orthonormal Legendre polynomials on [0,1]
  • Wiener: Eigenfunctions of the Wiener process

Enums§

EFunType
Eigenfunction type enum for simulation
EValType
Eigenvalue decay type for simulation

Functions§

add_error_curve
Add curve-level Gaussian noise to functional data.
add_error_pointwise
Add pointwise Gaussian noise to functional data.
eigenfunctions
Unified eigenfunction computation.
eigenvalues
Unified eigenvalue computation.
eigenvalues_exponential
Generate eigenvalue sequence with exponential decay.
eigenvalues_linear
Generate eigenvalue sequence with linear decay.
eigenvalues_wiener
Generate Wiener process eigenvalues.
fourier_eigenfunctions
Compute Fourier eigenfunctions on [0,1].
legendre_eigenfunctions
Compute Legendre polynomial eigenfunctions on [0,1].
sim_fundata
Simulate functional data with specified eigenfunction and eigenvalue types.
sim_kl
Simulate functional data via Karhunen-Loève expansion.
wiener_eigenfunctions
Compute Wiener process eigenfunctions on [0,1].