{"id":26984,"library":"fdasrsf","title":"fdasrsf - Functional Data Analysis using SRVF Framework","description":"A Python library for functional data analysis (FDA) using the Square Root Slope Framework (SRSF). It provides elastic registration, alignment, principal component analysis, and classification of functional data. Current version 2.6.9, with regular releases.","status":"active","version":"2.6.9","language":"python","source_language":"en","source_url":"https://github.com/jdtuck/fdasrsf_python","tags":["functional-data-analysis","SRVF","registration","elastic","time-warping"],"install":[{"cmd":"pip install fdasrsf","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"core array operations","package":"numpy","optional":false},{"reason":"optimization and interpolation","package":"scipy","optional":false},{"reason":"plotting","package":"matplotlib","optional":true}],"imports":[{"note":"Most common pattern: use `import fdasrsf` then access functions via `fdasrsf.function_name`. Submodules like `fdasrsf.fdaclassification` are often imported explicitly.","wrong":"from fdasrsf import ...","symbol":"fdasrsf","correct":"import fdasrsf"},{"note":"For warping functions; no common mistake.","symbol":"fdasrsf.time_warping","correct":"from fdasrsf import time_warping"}],"quickstart":{"code":"import fdasrsf\nimport numpy as np\n\n# Generate example functional data: 10 time series of 100 points\nN, M = 10, 100\nt = np.linspace(0, 1, M)\nf = np.random.randn(N, M)\n\n# Align functions using elastic registration\n# Note: The main alignment function is `elastic_regression`, but for alignment use `time_warping`.\naligned = fdasrsf.time_warping.align_fPCA(f, t)\nprint(aligned['fPCA'])\n","lang":"python","description":"Basic example of aligning functional data using fdasrsf."},"warnings":[{"fix":"Use `from fdasrsf.time_warping import align_fPCA` instead.","message":"In version 2.x, the `fdasrsf` package moved from `fdasrsf` (no subpackage) to a structure with submodules. Old code using `from fdasrsf import align_fPCA` no longer works.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Replace `fdasrsf.fdaclassification.classification` with `fdasrsf.classification.classify`","message":"The function `fdasrsf.fdaclassification.classification()` was deprecated in favor of `fdasrsf.classification.classify()`.","severity":"deprecated","affected_versions":">=2.4.0"},{"fix":"Ensure your data matrix is (N, M), not (M, N). Transpose with `.T` if needed.","message":"The input data is expected as a 2D array of shape (N, M) where N=number of functions, M=number of time points. Many users pass (M, N) and get bizarre results.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install fdasrsf` in the correct environment (Python >=3.10).","cause":"The package is not installed or installed in a different Python environment.","error":"ModuleNotFoundError: No module named 'fdasrsf'"},{"fix":"Use `from fdasrsf.time_warping import align_fPCA` or `import fdasrsf.time_warping` then `fdasrsf.time_warping.align_fPCA()`.","cause":"In version 2.x, submodules are not automatically imported. `fdasrsf` no longer has top-level functions.","error":"AttributeError: module 'fdasrsf' has no attribute 'align_fPCA'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}