Skip to main content

Module alignment

Module alignment 

Source
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:

Structs§

AlignmentDiagnostic
Diagnostic information for a single curve’s alignment.
AlignmentDiagnosticSummary
Summary of diagnostics across all curves.
AlignmentQuality
Comprehensive alignment quality assessment.
AlignmentResult
Result of aligning one curve to another.
AlignmentResultNd
Result of aligning multidimensional (R^d) curves.
AlignmentSetResult
Result of aligning a set of curves to a common target.
BayesianAlignConfig
Configuration for Bayesian pairwise alignment.
BayesianAlignmentResult
Result of Bayesian pairwise alignment.
ClosedAlignmentResult
Result of aligning one closed curve to another.
ClosedKarcherMeanResult
Result of computing the Karcher mean for closed curves.
ConstrainedAlignmentResult
Result of landmark-constrained elastic alignment.
DecompositionResult
Result of elastic phase-amplitude decomposition.
Dendrogram
Result of hierarchical clustering (dendrogram).
DiagnosticConfig
Configuration for alignment diagnostics.
ElasticDepthResult
Result of elastic depth computation.
ElasticOutlierConfig
Configuration for elastic outlier detection.
ElasticOutlierResult
Result of elastic outlier detection.
FpnsResult
Result of horizontal Functional Principal Nested Spheres (FPNS) analysis.
GenerativeModelResult
Result of Gaussian generative model sampling.
GeodesicPath
A geodesic path between two 1-D curves in the elastic metric.
GeodesicPathNd
A geodesic path between two N-D curves in the elastic metric.
KMedoidsConfig
Configuration for k-medoids clustering.
KMedoidsResult
Result of k-medoids clustering.
KarcherMeanResult
Result of the Karcher mean computation.
KarcherMeanResultNd
Result of the Karcher mean computation for multidimensional (R^d) curves.
LambdaCvConfig
Configuration for lambda cross-validation.
LambdaCvResult
Result of lambda cross-validation.
MultiresConfig
Configuration for multi-resolution alignment.
OrbitRepresentative
A canonical representative of a shape orbit.
PartialMatchConfig
Configuration for elastic partial matching.
PartialMatchResult
Result of elastic partial matching.
PcaNdResult
Result of PCA on aligned multidimensional (R^d) curves.
PersistenceDiagramResult
Result of the peak persistence analysis across a sweep of lambda values.
PhaseBoxplot
Result of computing a phase (warping) box plot.
RobustKarcherConfig
Configuration for robust Karcher estimation.
RobustKarcherResult
Result of robust Karcher estimation.
ShapeCiConfig
Configuration for shape bootstrap confidence intervals.
ShapeCiResult
Result of shape bootstrap confidence interval computation.
ShapeDistanceResult
Result of computing the elastic shape distance between two curves.
ShapeMeanResult
Result of computing the shape mean of a set of curves.
TransferAlignConfig
Configuration for transfer alignment.
TransferAlignResult
Result of transfer alignment.
TsrvfResult
Result of the TSRVF transform.
WarpStatistics
Statistics computed on a set of warping functions.

Enums§

Linkage
Linkage method for hierarchical clustering.
ShapeQuotient
Quotient space for shape analysis.
TransportMethod
Method for transporting tangent vectors on the Hilbert sphere.
WarpPenaltyType
Penalty type for alignment regularization.

Traits§

AlignmentOutput
Common interface for alignment results, enabling interchangeable alignment methods in downstream analysis (elastic FPCA, regression, etc.).

Functions§

align_to_target
Align all curves in data to 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 f2 to closed curve f1 with rotation search.
elastic_align_pair_constrained
Align f2 to f1 with landmark constraints.
elastic_align_pair_multires
Align curve f2 to f1 using 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 template within target.
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.