powered by
An algorithm with primary smoothing and repeated baseline suppressions and regressions with 2nd derivative constraint
baseline.irls(spectra, lambda1 = 5, lambda2 = 9, maxit = 200, wi = 0.05)
Matrix of baselines corresponding to spectra spectra
spectra
Matrix of baseline corrected spectra
Matrix of primary smoothed spectra
Matrix with spectra in rows
2nd derivative constraint for primary smoothing
2nd derivative constraint for secondary smoothing
Maximum number of iterations
Weighting of positive residuals
Kristian Hovde Liland and Bjørn-Helge Mevik
data(milk) bc.irls <- baseline(milk$spectra[1,, drop=FALSE], method='irls') if (FALSE) { plot(bc.irls) }
Run the code above in your browser using DataLab