← Back to all sparks
F

fdacluster

INFRA · APIS
Velocity0.0

Joint Clustering and Alignment of Functional Data

Functional data clustering grew from one algorithm into a comparable suite

functional-data-analysisclusteringr-packagercppcurve-alignment
Current state
fdacluster clusters functional data while separating amplitude from phase variation, aligning curves as part of the clustering rather than before it. The algorithm set covers k-means, hierarchical clustering and DBSCAN, all producing a common caps result object so runs can be compared directly. Version 0.4.0 tightened the interface with is_domain_interval and transformation arguments describing the input data, added compatibility checking between incompatible option combinations, and split the L2 and normalized L2 distances into separate C++ classes to enforce that plain L2 cannot be combined with dilation or affine warping it is not invariant to.
Where it's heading
The trajectory runs from method implementation toward guardrails and portability. Early releases added capability; recent ones prevent misuse and reduce weight - dplyr, forcats, tidyr and purrr removed in 0.4.0, furrr swapped for future.apply - while 0.4.2 is entirely C++ correctness, replacing Armadillo's whole-object finiteness check with scalar std::isfinite and fixing an integer overflow in linear index computation that broke large datasets. Cadence is roughly one release a year.
Prediction
Given that the last two releases were dependency reduction and numerical correctness rather than method work, expect the next to continue in that vein unless a new clustering algorithm is contributed.

Recent moves

  1. 7mo ago

    Integer overflow fixed for large datasets, C++ finiteness checks corrected

    Fixes an integer overflow when computing linear indices on large datasets by deriving the (i,j) pair on the fly, which is the difference between the package working and not working at scale. Also corrects use of Armadillo's object-level finiteness check where a scalar check was meant.

    View source ↗
  2. 1y ago

    Parallel worker setup and an acronym correction

    Ensures the package is loaded on future workers so parallel runs do not fail, and corrects SRSF to SRVF in the documentation. Two small items closing out the previous release.

    View source ↗
  3. 1y ago

    Input description arguments and enforced distance-warping compatibility

    Adds is_domain_interval and transformation so the caller states what kind of functional data is being supplied, and check_option_compatibility() to reject combinations that do not make sense. The separation of L2 and normalized L2 into distinct C++ classes encodes an invariance constraint in the type system rather than leaving it to the user, which is the more durable fix. Four tidyverse dependencies were dropped in the same release.

    View source ↗
  4. 3y ago

    Median centroids and centroids defined on unioned grids

    Adds a median centroid type and redefines both median and mean centroids on the union of individual grids rather than a shared one, which matters when curves are observed on different grids. Also simplifies the caps class to stop storing the same objects under multiple names.

    View source ↗
  5. 3y ago

    Namespace notation and optional dependency guards

    Makes the package usable with namespace notation and checks that fda and funData are available before use. Packaging correctness, not functionality.

    View source ↗
  6. 3y ago

    Hierarchical clustering, DBSCAN and a shared result class arrive together

    ⚡ SPARK

    The release that turned a k-means implementation into a clustering framework. The caps class introduced here is what every later release builds on, and the comparison tooling is what makes having three algorithms useful rather than merely plural.

    View source ↗