{"id":35511902,"url":"https://github.com/sipemu/fdars","last_synced_at":"2026-04-04T15:02:06.039Z","repository":{"id":328916569,"uuid":"1115191198","full_name":"sipemu/fdars","owner":"sipemu","description":"Functional Data Analysis in R and Rust - High-performance FDA algorithms including depth measures, metrics, clustering, smoothing, and regression","archived":false,"fork":false,"pushed_at":"2026-04-01T12:08:44.000Z","size":212135,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-01T12:35:53.494Z","etag":null,"topics":["data-science","fda","functional-data-analysis","r","rust","statistics"],"latest_commit_sha":null,"homepage":"https://sipemu.github.io/fdars-r/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sipemu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-12-12T13:28:10.000Z","updated_at":"2026-04-01T12:08:48.000Z","dependencies_parsed_at":"2026-03-11T22:00:51.553Z","dependency_job_id":null,"html_url":"https://github.com/sipemu/fdars","commit_stats":null,"previous_names":["sipemu/fdars"],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/sipemu/fdars","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sipemu%2Ffdars","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sipemu%2Ffdars/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sipemu%2Ffdars/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sipemu%2Ffdars/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sipemu","download_url":"https://codeload.github.com/sipemu/fdars/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sipemu%2Ffdars/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31403952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-science","fda","functional-data-analysis","r","rust","statistics"],"created_at":"2026-01-03T21:16:20.342Z","updated_at":"2026-04-04T15:02:06.032Z","avatar_url":"https://github.com/sipemu.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Functional Data Analysis (FDA)\n\n[![Rust CI](https://github.com/sipemu/fdars/actions/workflows/rust-ci.yml/badge.svg)](https://github.com/sipemu/fdars/actions/workflows/rust-ci.yml)\n[![Crates.io](https://img.shields.io/crates/v/fdars-core.svg)](https://crates.io/crates/fdars-core)\n[![Documentation](https://docs.rs/fdars-core/badge.svg)](https://docs.rs/fdars-core)\n[![codecov](https://codecov.io/gh/sipemu/fdars/graph/badge.svg)](https://codecov.io/gh/sipemu/fdars)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nHigh-performance Functional Data Analysis tools implemented in Rust with R bindings.\n\n## Packages\n\n| Package | Language | Registry | Folder | Status |\n|---------|----------|----------|--------|--------|\n| fdars | R | CRAN | [sipemu/fdars-r](https://github.com/sipemu/fdars-r) | [![CRAN](https://www.r-pkg.org/badges/version/fdars)](https://cran.r-project.org/package=fdars) |\n| fdars-core | Rust | crates.io | `fdars-core/` | [![Crates.io](https://img.shields.io/crates/v/fdars-core.svg)](https://crates.io/crates/fdars-core) |\n\n## Features\n\n| Area | Capabilities |\n|------|-------------|\n| **Core** | Simulation (KL expansion, GP with 8 kernels), functional operations, smoothing (NW, local polynomial, k-NN), basis representations (B-spline, Fourier, P-spline) |\n| **Descriptive** | 10 depth measures + streaming online depth, 12 distance metrics (Lp, DTW, elastic, semimetrics, KL), LRT outlier detection |\n| **Regression** | Scalar-on-function (FPC, kernel, logistic, robust), function-on-scalar (FOSR, 2D FOSR, FANOVA), FPCA, PLS, ridge, mixed effects |\n| **Classification** | LDA, QDA, k-NN, kernel, DD-classifier, conformal prediction sets; k-means, fuzzy c-means, GMM |\n| **Elastic Alignment** | SRSF/DP alignment, Karcher mean (1-D/N-D), TSRVF, Bayesian (pCN MCMC), closed curves, transfer alignment, partial matching, multi-resolution, generative models, geodesics, FPNS, lambda CV, peak persistence |\n| **Elastic Robust** | Karcher median, trimmed mean, SRVF outlier detection, elastic depth, shape CIs, diagnostics, warp statistics, phase box plots, shape analysis |\n| **Elastic Models** | Elastic FPCA, regression, PCR, logistic, scalar-on-shape (ScoSh), changepoint detection, elastic clustering |\n| **SPM** | T²/SPE Phase I/II, EWMA, MEWMA, CUSUM, adaptive EWMA, FRCC, profile monitoring; bootstrap/KDE limits, ARL, partial-domain, elastic SPM, iterative Phase I, Western Electric/Nelson rules |\n| **Explainability** | PDP/ICE, SHAP, ALE, LIME, Sobol, Friedman H, anchors, counterfactuals, prototype/criticism; influence diagnostics, VIF, calibration (ECE, Brier), saliency maps; `FpcPredictor` trait |\n| **Inference** | Tolerance bands (FPCA, conformal, Degras, exponential, elastic), conformal prediction (split, Jackknife+, CV+), equivalence testing (TOST) |\n| **Time Series** | Seasonal detection (FFT, ACF, Autoperiod, SAZED, Lomb-Scargle, SSA, matrix profile), detrending (polynomial, LOESS, STL) |\n| **Specialized** | Streaming depth (online O(log N)), irregular data (CSR, kernel estimation) |\n\n## Installation\n\n### R (fdars)\n\n```r\ninstall.packages(\"fdars\")\n\n# Development version from GitHub (requires Rust toolchain)\ndevtools::install_github(\"sipemu/fdars-r\")\n```\n\n### Rust (fdars-core)\n\n```toml\n[dependencies]\nfdars-core = \"0.9\"\n```\n\nOr install from the repository:\n\n```toml\n[dependencies]\nfdars-core = { git = \"https://github.com/sipemu/fdars\" }\n```\n\n## Feature Flags\n\n- `parallel` (default): Enable rayon-based parallel processing\n- `linalg`: Enable linear algebra features (faer, ridge regression) — requires Rust 1.84+\n- `js`: Enable WASM support with JS random number generation\n\nFor WASM builds, disable default features:\n\n```toml\n[dependencies]\nfdars-core = { version = \"0.9\", default-features = false }\n```\n\n## Data Layout\n\nFunctional data is represented using the [`FdMatrix`](https://docs.rs/fdars-core/latest/fdars_core/matrix/struct.FdMatrix.html) type, a column-major matrix wrapping a flat `Vec\u003cf64\u003e` with safe `(i, j)` indexing and dimension tracking:\n- For n observations with m evaluation points: `data[(i, j)]` gives observation i at point j\n- Zero-copy column access via `data.column(j)`, row gather via `data.row(i)`\n- nalgebra interop via `to_dmatrix()` / `from_dmatrix()` for SVD operations\n- 2D surfaces (n observations, m1 x m2 grid): stored as n x (m1*m2) matrices\n\n## Quick Start\n\n```rust\nuse fdars_core::{FdMatrix, fdata, depth};\n\n// Create sample functional data (3 observations, 10 points each)\nlet n = 3;\nlet m = 10;\nlet data: Vec\u003cf64\u003e = (0..(n * m)).map(|i| (i as f64).sin()).collect();\nlet mat = FdMatrix::from_column_major(data, n, m).unwrap();\nlet argvals: Vec\u003cf64\u003e = (0..m).map(|i| i as f64 / (m - 1) as f64).collect();\n\n// Compute mean function\nlet mean = fdata::mean_1d(\u0026mat);\n\n// Compute Fraiman-Muniz depth\nlet depths = depth::fraiman_muniz_1d(\u0026mat, \u0026mat, true);\n```\n\n## Examples\n\n27 runnable examples in [`fdars-core/examples/`](fdars-core/examples/):\n\n| # | Example | Topics |\n|---|---------|--------|\n| 01 | [Simulation](fdars-core/examples/01_simulation/) | KL expansion, GP generation |\n| 02 | [Functional Operations](fdars-core/examples/02_functional_operations/) | Mean, derivatives, norms |\n| 03 | [Smoothing](fdars-core/examples/03_smoothing/) | NW, local polynomial, k-NN |\n| 04 | [Basis Representation](fdars-core/examples/04_basis_representation/) | B-splines, Fourier, P-splines |\n| 05 | [Depth Measures](fdars-core/examples/05_depth_measures/) | 8 depth measures, outlier ranking |\n| 06 | [Distances](fdars-core/examples/06_distances_and_metrics/) | Lp, DTW, elastic, semimetrics |\n| 07 | [Clustering](fdars-core/examples/07_clustering/) | K-means, fuzzy c-means |\n| 08 | [Regression](fdars-core/examples/08_regression/) | FPCA, PLS |\n| 09 | [Outlier Detection](fdars-core/examples/09_outlier_detection/) | LRT bootstrap |\n| 10 | [Seasonal Analysis](fdars-core/examples/10_seasonal_analysis/) | FFT, Autoperiod, SAZED |\n| 11 | [Detrending](fdars-core/examples/11_detrending/) | Polynomial, LOESS, STL |\n| 12 | [Streaming Depth](fdars-core/examples/12_streaming_depth/) | Online depth |\n| 13 | [Irregular Data](fdars-core/examples/13_irregular_data/) | CSR storage, kernel estimation |\n| 14 | [Complete Pipeline](fdars-core/examples/14_complete_pipeline/) | End-to-end workflow |\n| 15 | [Tolerance Bands](fdars-core/examples/15_tolerance_bands/) | FPCA, conformal, Degras SCB |\n| 16 | [Elastic Alignment](fdars-core/examples/16_elastic_alignment/) | SRSF, DP, Karcher mean |\n| 17 | [Equivalence Test](fdars-core/examples/17_equivalence_test/) | Functional TOST |\n| 18 | [Landmark Registration](fdars-core/examples/18_landmark_registration/) | Constrained alignment |\n| 19 | [TSRVF](fdars-core/examples/19_tsrvf/) | Transported SRVF |\n| 20 | [Scalar-on-Function](fdars-core/examples/20_scalar_on_function/)` *` | FPC linear, logistic, kernel |\n| 21 | [Function-on-Scalar](fdars-core/examples/21_function_on_scalar/)` *` | FOSR, FANOVA |\n| 22 | [GMM Clustering](fdars-core/examples/22_gmm_clustering/)` *` | GMM-EM, BIC/ICL |\n| 23 | [Classification](fdars-core/examples/23_classification/)` *` | LDA, QDA, k-NN, DD |\n| 24 | [Mixed Effects](fdars-core/examples/24_mixed_effects/)` *` | FAMM, REML |\n| 25 | [Explainability](fdars-core/examples/25_explainability/)` *` | SHAP, ALE, PDP, anchors |\n| 26 | [Elastic Analysis](fdars-core/examples/26_elastic_analysis/)` *` | Elastic FPCA, regression, PCR |\n| 27 | [SPM](fdars-core/examples/27_spm/) | Phase I/II, EWMA, CUSUM, rules |\n\n`*` requires `--features linalg`\n\nRun with `cargo run -p fdars-core --example \u003cname\u003e` (add `--features linalg` where marked).\n\n## Performance\n\nWith the `parallel` feature (enabled by default), computationally intensive operations use `rayon` for multi-core performance. The library also supports WASM targets with sequential execution.\n\n## Documentation\n\n- **R Package**: [https://sipemu.github.io/fdars/](https://sipemu.github.io/fdars/)\n- **Rust Crate**: [https://docs.rs/fdars-core](https://docs.rs/fdars-core)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsipemu%2Ffdars","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsipemu%2Ffdars","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsipemu%2Ffdars/lists"}