search for: difsm

Displaying 2 results from an estimated 2 matches for "difsm".

Did you mean: difs
2004 Jun 25
2
Matrix: Help with syntax and comparison with SparseM
Hi, I am writing some basic smoothers in R for cleaning some spectral data. I wanted to see if I could get close to matlab for speed, so I was trying to compare SparseM with Matrix to see which could do the choleski decomposition the fastest. Here is the function using SparseM difsm <- function(y, lambda, d){ # Smoothing with a finite difference penalty # y: signal to be smoothed # lambda: smoothing parameter # d: order of differences in penalty (generally 2) # based on code by Paul Eilers 2002 require(SparseM) m <- length(y) E <- as(m,"matrix.dia...
2004 Feb 06
1
Savitzky-Golay smoothing -- an R implementation
As the request for the Savitzky-Golay Algorithm in R has come up several times, I here include my implementation based on code written for Matlab. Savitzky-Golay uses the pseudo-inverse pinv() of a matrix. There is an 'generalized inverse' ginv() in the MASS package, but I use a simpler form because I didn't want to 'require' MASS any time I apply Savitzky-Golay.