% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PipeOpFDARegister.R
\name{mlr_pipeops_fda.register}
\alias{mlr_pipeops_fda.register}
\alias{PipeOpFDARegister}
\title{Register (Align) Functional Columns}
\description{
Aligns functional features by estimating warping functions against a template using \code{\link[tf:tf_register]{tf::tf_register()}}.
Registration reduces phase (horizontal) variability while preserving amplitude (vertical) variability,
which is useful when curves share a common shape but differ in the timing of their features.

During training, a template is learned for each functional column (either estimated iteratively from the
data or supplied via \code{args}). The template is stored as part of the \verb{$state} and reused at predict time
so that new observations are aligned to the same reference as the training data.

Supported methods are \code{"srvf"}, \code{"cc"}, and \code{"affine"}. The \code{"landmark"} method from \code{\link[tf:tf_register]{tf::tf_register()}}
is not supported because it requires per-observation landmark positions for both training and prediction
data, which does not fit a stateful preprocessing step. For landmark registration, use \code{\link[tf:tf_register]{tf::tf_register()}}
directly and feed the aligned data into the task.
}
\section{Parameters}{

The parameters are the parameters inherited from \code{\link[mlr3pipelines:PipeOpTaskPreproc]{PipeOpTaskPreproc}},
as well as the following parameters:
\itemize{
\item \code{method} :: \code{character(1)}\cr
Registration method. One of:
\itemize{
\item \code{"srvf"}: elastic registration using the Square Root Velocity Framework via \code{\link[fdasrvf:time_warping]{fdasrvf::time_warping()}}.
Requires regular grids and the \CRANpkg{fdasrvf} package. Default template is the Karcher mean.
\item \code{"cc"}: continuous-criterion registration with monotone spline warps. Requires regular grids.
Default template is the arithmetic mean.
\item \code{"affine"}: affine (shift and/or scale) registration with warps of the form \eqn{h(t) = a \cdot t + b}.
Supports regular and irregular grids. Default template is the arithmetic mean.
}

Default is \code{"srvf"}.
\item \code{args} :: named \code{list()}\cr
Method-specific arguments passed to \code{\link[tf:tf_register]{tf::tf_register()}} via \code{...}. See the help page of
\code{\link[tf:tf_estimate_warps]{tf::tf_estimate_warps()}} for valid arguments (e.g. \code{lambda} / \code{penalty_method} for \code{"srvf"};
\code{nbasis}, \code{lambda}, \code{crit}, \code{conv}, \code{iterlim} for \code{"cc"}; \code{type}, \code{shift_range}, \code{scale_range}
for \code{"affine"}). An optional \code{template} entry is honored at training time and stored in the state.
\item \code{max_iter} :: \code{integer(1)}\cr
Maximum number of Procrustes-style template refinement iterations during training. Default is \code{3}.
Ignored at predict time because the stored template is used directly.
\item \code{tol} :: \code{numeric(1)}\cr
Convergence tolerance for template refinement during training. Default is \code{0.01}.
}
}

\section{State}{

\verb{$state$templates} contains the learned template (as a length-1 \code{tf} vector) for each functional column.
}

\examples{
\donttest{
set.seed(1)
task = tsk("fuel")
po_reg = po("fda.register", method = "affine", args = list(type = "shift_scale"))
task_reg = po_reg$train(list(task))[[1L]]
task_reg$data(cols = c("NIR", "UVVIS"))
}
}
\section{Super classes}{
\code{\link[mlr3pipelines:PipeOp]{mlr3pipelines::PipeOp}} -> \code{\link[mlr3pipelines:PipeOpTaskPreproc]{mlr3pipelines::PipeOpTaskPreproc}} -> \code{PipeOpFDARegister}
}
\section{Methods}{
\subsection{Public methods}{
  \itemize{
    \item \href{#method-PipeOpFDARegister-initialize}{\code{PipeOpFDARegister$new()}}
    \item \href{#method-PipeOpFDARegister-clone}{\code{PipeOpFDARegister$clone()}}
  }
}
\if{html}{\out{<details open><summary>Inherited methods</summary>
<ul>
  <li><span class="pkg-link" data-pkg="mlr3pipelines" data-topic="PipeOp" data-id="help"><a href='../../mlr3pipelines/html/PipeOp.html#method-PipeOp-help'><code>mlr3pipelines::PipeOp$help()</code></a></span></li>
  <li><span class="pkg-link" data-pkg="mlr3pipelines" data-topic="PipeOp" data-id="predict"><a href='../../mlr3pipelines/html/PipeOp.html#method-PipeOp-predict'><code>mlr3pipelines::PipeOp$predict()</code></a></span></li>
  <li><span class="pkg-link" data-pkg="mlr3pipelines" data-topic="PipeOp" data-id="print"><a href='../../mlr3pipelines/html/PipeOp.html#method-PipeOp-print'><code>mlr3pipelines::PipeOp$print()</code></a></span></li>
  <li><span class="pkg-link" data-pkg="mlr3pipelines" data-topic="PipeOp" data-id="train"><a href='../../mlr3pipelines/html/PipeOp.html#method-PipeOp-train'><code>mlr3pipelines::PipeOp$train()</code></a></span></li>
</ul>
</details>}}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-PipeOpFDARegister-initialize"></a>}}
\if{latex}{\out{\hypertarget{method-PipeOpFDARegister-initialize}{}}}
\subsection{\code{PipeOpFDARegister$new()}}{
  Initializes a new instance of this Class.
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{PipeOpFDARegister$new(id = "fda.register", param_vals = list())}
    \if{html}{\out{</div>}}
  }
  \subsection{Arguments}{
    \if{html}{\out{<div class="arguments">}}
    \describe{
      \item{\code{id}}{(\code{character(1)})\cr
Identifier of resulting object, default \code{"fda.register"}.}
      \item{\code{param_vals}}{(named \code{list()})\cr
List of hyperparameter settings, overwriting the hyperparameter settings that would
otherwise be set during construction. Default \code{list()}.}
    }
    \if{html}{\out{</div>}}
  }
}

\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-PipeOpFDARegister-clone"></a>}}
\if{latex}{\out{\hypertarget{method-PipeOpFDARegister-clone}{}}}
\subsection{\code{PipeOpFDARegister$clone()}}{
  The objects of this class are cloneable with this method.
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{PipeOpFDARegister$clone(deep = FALSE)}
    \if{html}{\out{</div>}}
  }
  \subsection{Arguments}{
    \if{html}{\out{<div class="arguments">}}
    \describe{
      \item{\code{deep}}{Whether to make a deep clone.}
    }
    \if{html}{\out{</div>}}
  }
}

}
