[Paper Review] FDApy: a Python package for functional data
FDApy is an open-source Python package for analyzing multivariate and multidimensional functional data, including irregularly sampled data, using basis expansion and multivariate functional principal component analysis (MFPCA). It enables accurate estimation of eigenfunctions and supports simulation, dimension reduction, and visualization, demonstrating high accuracy in recovering true functional structures from complex datasets.
We introduce FDApy, an open-source Python package for the analysis of functional data. The package provides tools for the representation of (multivariate) functional data defined on different dimensional domains and for functional data that is irregularly sampled. Additionally, dimension reduction techniques are implemented for multivariate and/or multidimensional functional data that are regularly or irregularly sampled. A toolbox for generating functional datasets is also provided. The documentation includes installation and usage instructions, examples on simulated and real datasets and a complete description of the API. FDApy is released under the MIT license. The code and documentation are available at https://github.com/StevenGolovkine/FDApy.
Motivation & Objective
- To address the lack of comprehensive, extensible, and Python-native tools for functional data analysis (FDA), especially for multivariate and multidimensional functional data.
- To support functional data that are irregularly sampled or defined on different dimensional domains, which are underrepresented in existing Python FDA libraries.
- To provide a flexible, extensible framework for implementing and testing new FDA methods, such as regression and clustering.
- To enable accurate dimension reduction via MFPCA on complex functional datasets, including simulated and real-world examples.
- To offer a user-friendly, well-documented, and MIT-licensed software package compatible with scientific and industrial applications.
Proposed method
- Represents functional data using observed values and basis expansion, enabling flexible modeling of multivariate and multidimensional functions.
- Employs multivariate functional principal component analysis (MFPCA) for dimension reduction on both regular and irregularly sampled data.
- Uses truncated Karhunen-Loève expansion with orthonormal bases (e.g., Fourier, Legendre) to simulate functional data with controlled structure.
- Applies P-spline smoothing to estimated eigenfunctions to improve numerical stability and visualization.
- Implements a simulation toolbox that allows users to configure parameters such as basis types, eigenvalue decay, and sampling irregularity (65–85% point removal).
- Supports data representation through inner-product matrices and enables estimation of eigenfunctions via diagonalization of empirical covariance operators.
Experimental results
Research questions
- RQ1Can a Python-based FDA package effectively handle multivariate functional data defined on different dimensional domains, including irregular sampling?
- RQ2How accurately can MFPCA in FDApy recover true eigenfunctions from simulated functional data with complex, multidimensional structures?
- RQ3To what extent does FDApy support the integration of new statistical methods, such as regression or clustering, for irregular and multivariate functional data?
- RQ4How well does the simulation toolbox in FDApy reproduce known functional data characteristics, such as eigenfunction shapes and score distributions?
- RQ5Can FDApy serve as a robust, extensible, and user-friendly alternative to existing R-based FDA tools within the Python scientific ecosystem?
Key findings
- FDApy successfully estimates multivariate eigenfunctions with high accuracy, as evidenced by near-identical visual alignment between true and estimated eigenfunctions in the simulation study.
- The method achieves precise recovery of eigenfunctions even when data are irregularly sampled, with up to 85% of sampling points randomly removed from the first feature.
- The simulation toolbox accurately reproduces functional data with specified basis structures (e.g., Fourier and Legendre), eigenvalue decay (λk = exp(−(k+1)/2)), and multivariate correlation via random weighting factors.
- The implementation of MFPCA via inner-product matrix diagonalization effectively captures the dominant modes of variation in both image and curve features.
- FDApy’s integration of P-spline smoothing improves the visual and numerical stability of estimated eigenfunctions, especially in irregular sampling scenarios.
- The package demonstrates robustness and flexibility in handling diverse functional data types, including real-world datasets like Canadian weather and NBA shooting trajectories.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.