Skip to contents

Fit polynomial parametric curve to ETM/TMA points normalized to t in [0, 1]

Usage

tma_fit_poly_curve(
  pts,
  x_col = NULL,
  y_col = NULL,
  time_col = "RowID",
  degree = NULL,
  max_degree = 3L,
  criterion = c("loocv", "aic"),
  fit_curve_with_zero_pts = FALSE,
  zero_eps = 1e-08
)

Arguments

pts

data.frame or matrix of points

x_col

Column name for x coordinate

y_col

Column name for y coordinate

time_col

Column name for time ordering

degree

Fixed polynomial degree (optional)

max_degree

Maximum degree to evaluate for LOOCV-2D (default 3)

criterion

"loocv" or "aic"

fit_curve_with_zero_pts

Logical; whether to retain (0,0) points

zero_eps

Tolerance for detecting (0,0) points

Value

List with fitted curve parameters, prediction closures, and metadata