penalized_linear_spherical_spline {spheresmooth} | R Documentation |
Penalized Linear Spherical Spline
Description
This function fits a penalized piecewise geodesic curve (linear spherical spline) to the given data.
Usage
penalized_linear_spherical_spline(
t,
y,
initial_control_points = NULL,
dimension,
initial_knots,
lambdas,
step_size = 1,
maxiter = 1000,
epsilon_iter = 0.001,
jump_eps = 1e-04,
verbose = FALSE
)
Arguments
t |
A numeric vector representing the time or location. |
y |
A matrix where each row represents a data point on the sphere. |
initial_control_points |
An optional matrix specifying initial control points. Default is NULL. |
dimension |
An integer specifying the dimension of the spline. |
initial_knots |
An optional numeric vector specifying initial knots. Default is NULL. |
lambdas |
A numeric vector specifying the penalization parameters. |
step_size |
A numeric value specifying the step size for optimization. Default is 1. |
maxiter |
An integer specifying the maximum number of iterations. Default is 1000. |
epsilon_iter |
A numeric value specifying the convergence criterion for iterations. Default is 1e-03. |
jump_eps |
A numeric value specifying the threshold for pruning control points based on jump size. Default is 1e-04. |
verbose |
A logical value indicating whether to print progress information. Default is FALSE. |
Details
The goal is to find the optimal piecewise geodesic curve for the given spherical data while controlling model complexity through penalty terms. This function computes the optimal control points and knots for the given data and returns the fitted result. Internally, coordinate-wise gradient descent is used to minimize the loss function, and a penalty term is added to control the complexity of the model. The BIC (Bayesian Information Criterion) value is calculated according to the model's complexity to provide information for model selection. The function constructs piecewise curves using the piecewise_geodesic function and employs penalty terms to control the complexity of the model by updating control points and knots. To see how to use the function in practical applications, refer to the README or https://github.com/kybak90/spheresmooth.
Value
A list containing the fitted result for each complexity parameter and BIC values for model selection. One might choose the element that corresponds to the minimum BIC values as illustrated in the example.