Skip to main content

transfer_alignment

Function transfer_alignment 

Source
pub fn transfer_alignment(
    source_data: &FdMatrix,
    target_data: &FdMatrix,
    argvals: &[f64],
    config: &TransferAlignConfig,
) -> Result<TransferAlignResult, FdarError>
Expand description

Align curves from a target population to a source population’s coordinate system.

Computes Karcher means for both populations, finds the bridging warp that aligns the target mean to the source mean, then composes this bridge with each target curve’s within-population warp to produce curves aligned in the source coordinate frame.

§Arguments

  • source_data - Source population (n_source x m).
  • target_data - Target population to align (n_target x m).
  • argvals - Evaluation points (length m).
  • config - Transfer alignment configuration.

§Errors

Returns FdarError::InvalidDimension if matrices have different ncols, argvals length does not match, or either matrix has 0 rows.