Expand description
Elastic alignment and SRSF (Square-Root Slope Function) transforms.
This module provides phase-amplitude separation for functional data via the elastic framework. Key capabilities:
srsf_transform/srsf_inverse— SRSF representation and reconstructionelastic_align_pair— Pairwise curve alignment via dynamic programmingelastic_distance— Elastic (Fisher-Rao) distance between curvesalign_to_target— Align a set of curves to a common targetkarcher_mean— Karcher (Fréchet) mean in the elastic metricelastic_self_distance_matrix/elastic_cross_distance_matrix— Distance matricesreparameterize_curve/compose_warps— Warping utilities
Structs§
- Alignment
Diagnostic - Diagnostic information for a single curve’s alignment.
- Alignment
Diagnostic Summary - Summary of diagnostics across all curves.
- Alignment
Quality - Comprehensive alignment quality assessment.
- Alignment
Result - Result of aligning one curve to another.
- Alignment
Result Nd - Result of aligning multidimensional (R^d) curves.
- Alignment
SetResult - Result of aligning a set of curves to a common target.
- Bayesian
Align Config - Configuration for Bayesian pairwise alignment.
- Bayesian
Alignment Result - Result of Bayesian pairwise alignment.
- Closed
Alignment Result - Result of aligning one closed curve to another.
- Closed
Karcher Mean Result - Result of computing the Karcher mean for closed curves.
- Constrained
Alignment Result - Result of landmark-constrained elastic alignment.
- Decomposition
Result - Result of elastic phase-amplitude decomposition.
- Dendrogram
- Result of hierarchical clustering (dendrogram).
- Diagnostic
Config - Configuration for alignment diagnostics.
- Elastic
Depth Result - Result of elastic depth computation.
- Elastic
Outlier Config - Configuration for elastic outlier detection.
- Elastic
Outlier Result - Result of elastic outlier detection.
- Fpns
Result - Result of horizontal Functional Principal Nested Spheres (FPNS) analysis.
- Generative
Model Result - Result of Gaussian generative model sampling.
- Geodesic
Path - A geodesic path between two 1-D curves in the elastic metric.
- Geodesic
Path Nd - A geodesic path between two N-D curves in the elastic metric.
- KMedoids
Config - Configuration for k-medoids clustering.
- KMedoids
Result - Result of k-medoids clustering.
- Karcher
Mean Result - Result of the Karcher mean computation.
- Karcher
Mean Result Nd - Result of the Karcher mean computation for multidimensional (R^d) curves.
- Lambda
CvConfig - Configuration for lambda cross-validation.
- Lambda
CvResult - Result of lambda cross-validation.
- Multires
Config - Configuration for multi-resolution alignment.
- Orbit
Representative - A canonical representative of a shape orbit.
- Partial
Match Config - Configuration for elastic partial matching.
- Partial
Match Result - Result of elastic partial matching.
- PcaNd
Result - Result of PCA on aligned multidimensional (R^d) curves.
- Persistence
Diagram Result - Result of the peak persistence analysis across a sweep of lambda values.
- Phase
Boxplot - Result of computing a phase (warping) box plot.
- Robust
Karcher Config - Configuration for robust Karcher estimation.
- Robust
Karcher Result - Result of robust Karcher estimation.
- Shape
CiConfig - Configuration for shape bootstrap confidence intervals.
- Shape
CiResult - Result of shape bootstrap confidence interval computation.
- Shape
Distance Result - Result of computing the elastic shape distance between two curves.
- Shape
Mean Result - Result of computing the shape mean of a set of curves.
- Transfer
Align Config - Configuration for transfer alignment.
- Transfer
Align Result - Result of transfer alignment.
- Tsrvf
Result - Result of the TSRVF transform.
- Warp
Statistics - Statistics computed on a set of warping functions.
Enums§
- Linkage
- Linkage method for hierarchical clustering.
- Shape
Quotient - Quotient space for shape analysis.
- Transport
Method - Method for transporting tangent vectors on the Hilbert sphere.
- Warp
Penalty Type - Penalty type for alignment regularization.
Traits§
- Alignment
Output - Common interface for alignment results, enabling interchangeable alignment methods in downstream analysis (elastic FPCA, regression, etc.).
Functions§
- align_
to_ target - Align all curves in
datato a single target curve. - alignment_
quality - Compute comprehensive alignment quality metrics.
- amplitude_
distance - Compute the amplitude distance between two curves (= elastic distance after alignment).
- amplitude_
self_ distance_ matrix - Compute the symmetric amplitude distance matrix (= elastic self distance matrix).
- bayesian_
align_ pair - Perform Bayesian pairwise alignment of f2 to f1 via pCN MCMC on the Hilbert sphere.
- compose_
warps - Compose two warping functions:
(γ₁ ∘ γ₂)(t) = γ₁(γ₂(t)). - curve_
geodesic - Compute the geodesic path between two 1-D curves in the elastic metric.
- curve_
geodesic_ nd - Compute the geodesic path between two N-D curves in the elastic metric.
- cut_
dendrogram - Cut a dendrogram to produce k clusters.
- diagnose_
alignment - Diagnose alignment quality for every curve after a Karcher mean computation.
- diagnose_
pairwise - Diagnose a single pairwise alignment.
- elastic_
align_ pair - Align curve f2 to curve f1 using the elastic framework.
- elastic_
align_ pair_ closed - Align closed curve
f2to closed curvef1with rotation search. - elastic_
align_ pair_ constrained - Align f2 to f1 with landmark constraints.
- elastic_
align_ pair_ multires - Align curve
f2tof1using multi-resolution elastic alignment. - elastic_
align_ pair_ nd - Align an R^d curve f2 to f1 using the elastic framework.
- elastic_
align_ pair_ penalized - Align two curves with a configurable penalty type.
- elastic_
align_ pair_ with_ landmarks - Align f2 to f1 with automatic landmark detection and elastic constraints.
- elastic_
cross_ distance_ matrix - Compute the elastic distance matrix between two sets of curves.
- elastic_
decomposition - Perform elastic phase-amplitude decomposition of two curves.
- elastic_
depth - Compute amplitude + phase decomposed elastic depth.
- elastic_
distance - Compute the elastic distance between two curves.
- elastic_
distance_ closed - Compute the elastic distance between two closed curves.
- elastic_
distance_ nd - Elastic distance between two R^d curves.
- elastic_
outlier_ detection - Detect outlier curves using elastic distances and the Tukey fence.
- elastic_
partial_ match - Find the best elastic partial match of
templatewithintarget. - elastic_
self_ distance_ matrix - Compute the symmetric elastic distance matrix for a set of curves.
- gauss_
model - Generate random curves from a fitted Gaussian model on aligned data.
- hierarchical_
from_ distances - Hierarchical agglomerative clustering from a precomputed distance matrix.
- horiz_
fpns - Perform horizontal Functional Principal Nested Spheres (FPNS) analysis.
- invert_
warp - Compute the inverse of a warping function.
- joint_
gauss_ model - Generate random curves from a joint Gaussian model preserving amplitude-phase correlation.
- karcher_
covariance_ nd - Compute the cross-dimensional covariance matrix of aligned N-d curves.
- karcher_
mean - Compute the Karcher (Frechet) mean in the elastic metric.
- karcher_
mean_ closed - Compute the Karcher (Frechet) mean for closed curves.
- karcher_
mean_ nd - Compute the Karcher (Frechet) mean for multidimensional (R^d) curves.
- karcher_
median - Compute the Karcher median via the Weiszfeld algorithm on the elastic manifold.
- kmedoids_
from_ distances - K-medoids (PAM-style) clustering from a precomputed distance matrix.
- lambda_
cv - Select the best elastic-alignment regularisation parameter via K-fold cross-validation.
- orbit_
representative - Compute the canonical orbit representative of a curve.
- pairwise_
consistency - Measure pairwise alignment consistency via triplet checks.
- pca_nd
- Perform PCA on aligned multidimensional (R^d) curves.
- peak_
persistence - Analyse the stability of peak count in the Karcher mean across a sweep of alignment penalty values.
- phase_
boxplot - Compute a phase box plot from a set of warping functions.
- phase_
distance_ pair - Compute the phase distance between two curves (geodesic distance of optimal warp from identity).
- phase_
self_ distance_ matrix - Compute the symmetric phase distance matrix for a set of curves.
- reparameterize_
curve - Reparameterize a curve by a warping function.
- robust_
karcher_ mean - Compute a trimmed Karcher mean by removing the most distant curves.
- shape_
confidence_ interval - Compute bootstrap confidence intervals for the elastic Karcher mean.
- shape_
distance - Compute the elastic shape distance between two curves.
- shape_
mean - Compute the Karcher (Frechet) mean in the elastic shape space.
- shape_
self_ distance_ matrix - Compute the pairwise shape distance matrix for a set of curves.
- srsf_
inverse - Reconstruct a curve from its SRSF representation.
- srsf_
inverse_ nd - Reconstruct an R^d curve from its SRSF.
- srsf_
transform - Compute the Square-Root Slope Function (SRSF) transform.
- srsf_
transform_ nd - Compute the SRSF transform for multidimensional (R^d) curves.
- transfer_
alignment - Align curves from a target population to a source population’s coordinate system.
- tsrvf_
from_ alignment - Compute TSRVF from a pre-computed Karcher mean alignment.
- tsrvf_
from_ alignment_ with_ method - Compute TSRVF from a pre-computed Karcher mean with configurable transport.
- tsrvf_
inverse - Reconstruct aligned curves from TSRVF tangent vectors.
- tsrvf_
transform - Full TSRVF pipeline: compute Karcher mean, then transport SRSFs to tangent space.
- tsrvf_
transform_ with_ method - Full TSRVF pipeline with configurable transport method.
- warp_
complexity - Compute warp complexity: geodesic distance from a warp to the identity.
- warp_
inverse_ error - Verify roundtrip accuracy: max |γ(γ⁻¹(t)) - t| over the domain.
- warp_
smoothness - Compute warp smoothness (bending energy): ∫(γ’’)² dt.
- warp_
statistics - Compute summary statistics for a set of warping functions.