View source: R/17-fit_smoothing_parameters.R
fit_smoothing_parameters | R Documentation |
This function fits the span and degree parameters for the LOESS data smoothing method by testing different combinations of span and degree values and selecting the best parameters based on the R² value.
fit_smoothing_parameters(
x,
time,
threads = 10,
span_values = seq(0.1, 0.5, by = 0.01),
degree_values = 1:2,
progressbar = TRUE,
seed = 123
)
x |
A numeric vector of values to be smoothed. |
time |
A numeric vector of timestamps corresponding to |
span_values |
A numeric vector of span values to test (default is seq(0.1, 0.5, by = 0.01)). |
degree_values |
A numeric vector of degree values to test (default is 1:2). |
seed |
An integer for the random seed (default is 123). |
A list of the best span and degree parameters for the LOESS data smoothing method.
Zirui Qiang list("zirui_qiang@outlook.com")
Minghang Li list("minghli@ethz.ch")
data("step_data", package = "laggedcor")
best_params <- fit_smoothing_parameters(x = step_data$step,
time = step_data$time)
best_params
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.