← Back to all sparks
T

tf

INFRA · APIS
Velocity0.0

S3 Classes and Methods for Tidy Functional Data

tf gave functional data a second dimension: curves whose values are vectors.

functional-data-analysisvctrsmultivariater-packagesdependency-reduction
Current state
tf supplies the vector classes underneath the tidyfun stack — tfd for raw functional observations, tfb for basis-represented ones, both built on vctrs so curves sit in a data frame column and behave like any other vector. Until July that codomain was scalar. The 0.5.0 release adds tfd_mv and tfb_mv, classes for functions whose values are vectors in R^d, and rebuilds the analysis verbs to match.
Where it's heading
The package is widening what a functional observation can be, then porting the toolkit onto it. Registration arrived first in 0.4.0 for univariate curves and immediately gained an srvf_mv method for aligning components jointly, and tfb_mfpc() ports principal component analysis to the multivariate case with a single set of scores shared across components. Alongside that runs steady dependency shedding — mvtnorm and pracma both replaced by inlined samplers that reproduce prior draws bit-for-bit, glue dropped for cli in the previous release — and an unusually long tail of NA-handling and edge-case fixes, several caught in pre-release review of the new classes.
Prediction
The new classes ship with FPCA, registration and shape alignment but the release notes describe tidyfun::tf_unnest() as the consumer of one new export, so the visible next step is the rest of the tidyfun stack catching up to vector-valued columns. Expect follow-up patches on the vctrs casting paths, which is where most of this release's late fixes clustered.

Recent moves

  1. 1mo ago

    Vector-valued functional data becomes a first-class type

    ⚡ SPARK

    This changes what tf can represent, not just what it can compute. Every verb the package already had was defined against scalar-valued curves; 0.5.0 adds a parallel class hierarchy for curves into R^d and ports principal components, registration and the geometry verbs onto it in the same release.

    View source ↗
  2. 5mo ago

    Curve registration, five depth measures and sub-domain splitting

    The methods layer filling out on the existing univariate classes: tf_register() and its accessors bring SRVF, affine, landmark and continuous-criterion alignment; tf_depth() grows to five depth definitions on a common 0-to-1 scale; tf_split()/tf_combine() cut curves into sub-domain fragments. Also a major overhaul of NA handling, which the release treats as a bugfix but changes behaviour throughout.

    View source ↗
  3. 2y ago

    Fix: tf_crosscov normalization

    A single-line patch correcting normalization in tf_crosscov, from the long quiet stretch before the 0.4.0 methods push.

    View source ↗