optim_roughness: Compute the optimal smoothing parameter of slope_FUN

Description Usage Arguments Details

View source: R/optim_roughness.R

Description

Find smoothing paramters that matches rougness of original signal and of their slope

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
optim_roughness(
  y,
  slope_FUN,
  par = 0.5,
  avg_FUN = mean,
  roughness_FUN = roughness,
  method = c("Brent"),
  lower = 0,
  upper = 1
)

Arguments

y

matrix of the signals.

slope_FUN

function that compute the slope

par

initial value of the smoothing paramter. Default is 0.5.

avg_FUN

function to aggregate the rougness of each signal. Defaults is the method.

roughness_FUN

function of roughness to optimize

method

optimizer from optim. Defaults is "Brent".

lower

a scalar indicating the lower bound of par.

upper

a scalar indicating the upper bound of par.

Details

Check optim function.


jaromilfrossard/permucoSlope documentation built on March 30, 2020, 4:08 p.m.