align_new: Align New Functions to a Fitted Template

View source: R/align_new.R

align_newR Documentation

Align New Functions to a Fitted Template

Description

This function aligns new functions to the template SRVF (mqn) of an fdawarp object with the same lambda, penalty and optimization method used by time_warping() to fit it. When the fit smoothed the data (smooth_data = TRUE), the new functions are smoothed the same way first.

Usage

align_new(x, f_new)

Arguments

x

An object of class fdawarp typically produced by time_warping().

f_new

A numeric matrix of shape M \times K of K new functions sampled at x$time, or a numeric vector of length M for a single function.

Value

A list with components (one column per function):

  • fn: M \times K aligned functions;

  • qn: M \times K aligned SRVFs;

  • gam: M \times K warping functions.

Examples

## Not run: 
out <- time_warping(simu_data$f, simu_data$time)
aligned <- align_new(out, simu_data$f[, 1:3])

## End(Not run)

fdasrvf documentation built on Oct. 29, 2026, 9:06 a.m.