Package ‘baseline’ - R

2y ago
25 Views
2 Downloads
241.53 KB
47 Pages
Last View : 4m ago
Last Download : 3m ago
Upload by : Carlos Cepeda
Transcription

Package ‘baseline’September 12, 2020Encoding UTF-8Type PackageTitle Baseline Correction of SpectraVersion 1.3-1Date 2020-09-10Maintainer Kristian Hovde Liland kristian.liland@nmbu.no Description Collection of baseline correction algorithms, along with a framework and a Tcl/Tk enabled GUI for optimising baseline algorithm parameters. Typical use of the package is for removing background effects from spectra originating from various types of spectroscopy and spectrometry, possibly optimizing this with regard to regression or classification results. Correction methods include polynomial fitting, weighted local smoothers and many more.License GPL-2Depends R ( 2.15)Imports graphics, SparseM, grDevices, stats, methods, limSolveSuggests gWidgets2, gWidgets2tcltk, IDPmisc, lattice, pls, MASSLazyLoad trueLazyData trueZipData trueNeedsCompilation noAuthor Kristian Hovde Liland [aut, cre],Bjørn-Helge Mevik [aut],Roberto Canteri [ctb]Repository CRANDate/Publication 2020-09-12 06:20:03 UTCR topics documented:baseline-package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .baseline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1345

R topics documented:2baseline-class . . . . . . .baseline.als . . . . . . . .baseline.fillPeaks . . . . .baseline.irls . . . . . . . .baseline.lowpass . . . . .baseline.medianWindow .baseline.modpolyfit . . . .baseline.peakDetection . .baseline.rfbaseline . . . .baseline.rollingBall . . . .baseline.shirley . . . . . .baseline.TAP . . . . . . .baselineAlg-class . . . . .baselineAlgorithms . . . .baselineAlgorithmsGUI . .baselineAlgResult-class . .baselineAlgTest-class . . .baselineEnv . . . . . . . .baselineGUI . . . . . . . .custom.baseline . . . . . .doOptim . . . . . . . . . .funcName . . . . . . . . .getBaseline . . . . . . . .ind.min . . . . . . . . . .milk . . . . . . . . . . . .name . . . . . . . . . . . .optimWizard . . . . . . .overall.min . . . . . . . .param . . . . . . . . . . .param.ind.min . . . . . . .plotBaseline . . . . . . . .plotOptim . . . . . . . . .PLSRTest-class . . . . . .predictionResult-class . . .predictionTest-class . . . .qualMeas . . . . . . . . .ridgeRegressionTest-class .runTest . . . . . . . . . .XPSdata . . . . . . . . . 132323334353536373839404041424345

baseline-packagebaseline-package3Baseline correctionDescriptionA common framework with implementations of several baseline correction selinePackage1.2-22019-11-05GPL-2Use function baseline for baseline correction. This function takes matrices of spectra, a methodname and parameters needed for the specific method. See helpfiles for details.Author(s)Kristian Hovde Liland and Bjørn-Helge MevikMaintainer: Kristian Hovde Liland kristian.liland@nmbu.no ReferencesAndreas F. Ruckstuhl, Matthew P. Jacobson, Robert W. Field, James A. Dodd: Baseline subtractionusing robust local regression estimation; CHAD A. LIEBER and ANITA MAHADEVAN-JANSEN:Automated Method for Subtraction of Fluorescence from Biological Raman Spectra; Mark S.Friedrichs: A model-free algorithm for the removal of baseline artifacts; AHMET K. ATAKAN,W. E. BLASS, and D. E. JENNINGS: Elimination of Baseline Variations from a Recorded Spectrum by Ultra-low Frequency Filtering; M.A. Kneen, H.J. Annegarn: Algorithm for fitting XRF,SEM and PIXE X-ray spectra backgrounds; K.H. Liland, B.-H. Mevik, E.-O. Rukke, T. Almøy, M.Skaugen and T. Isaksson (2009) Quantitative whole spectrum analysis with MALDI-TOF MS, PartI: Measurement optimisation. Chemometrics and Intelligent Laboratory Systems, 96(2), 210–218.Examples# Load datadata(milk)# The baseline() function is an S4 wrapper for all the different# baseline correction methods. The default correction method# is IRLS. Data must be organized as row vectors in a matrix# or data.frame.bc.irls - baseline(milk spectra[1,, drop FALSE])## Not run:# Computationally heavy

4algorithmplot(bc.irls)## End(Not run)#####Available extractors ected(bc.irls)getCall(bc.irls)# Correction methods and parameters can be specified through the wrapper.bc.fillPeaks - baseline(milk spectra[1,, drop FALSE], lambda 6,hwi 50, it 10, int 2000, method 'fillPeaks')## Not run:# Computationally heavyplot(bc.fillPeaks)## End(Not run)# If a suitable gWidgets2 implementation is installed, a# graphical user interface is available for interactive# parameter adaption.## Not run:# Dependent on external softwarebaselineGUI(milk spectra)## End(Not run)algorithmExtraction methods for "baselineAlgTest" objectsDescriptionExtraction methods specifically for objects of class ect)ArgumentsobjectObject of class baselineAlgTestValueThe corresponding slotAuthor(s)Bjørn-Helge Mevik and Kristian Hovde Liland

baseline5See AlsobaselineAlgTestbaselineBaseline correctionDescriptionCommon framework for baseline correctionUsagebaseline(spectra, method "irls", .)ArgumentsspectraMatrix with spectra in rowsmethodBaseline correction method.Additional parameters, sent to the methodDetailsEstimates baselines for the spectra, using the algorithm named in method.ValueAn object of class baseline.Author(s)Kristian Hovde Liland and Bjørn-Helge MevikReferencesKristian Hovde Liland, Trygve Almøy, Bjørn-Helge Mevik (2010), Optimal Choice of BaselineCorrection for Multivariate Calibration of Spectra, Applied Spectroscopy 64, pp. 1007-1016.See AlsoThe functions implementing the baseline algorithms: baseline.als, baseline.fillPeaks, baseline.irls,baseline.lowpass, baseline.medianWindow, baseline.modpolyfit, baseline.peakDetection,baseline.rfbaseline, baseline.rollingBall, baseline.shirley, baseline.TAP

6baseline-classExamples# Load datadata(milk)# The baseline() function is an S4 wrapper for all the different# baseline correction methods. The default correction method# is IRLS. Data must be organized as row vectors in a matrix# or data.frame.bc.irls - baseline(milk spectra[1,, drop FALSE])## Not run:# Computationally heavyplot(bc.irls)## End(Not run)#####Available extractors ected(bc.irls)getCall(bc.irls)# Correction methods and parameters can be specified through the wrapper.bc.fillPeaks - baseline(milk spectra[1,, drop FALSE], lambda 6,hwi 50, it 10, int 2000, method 'fillPeaks')## Not run:# Computationally heavyplot(bc.fillPeaks)## End(Not run)# If a suitable gWidgets2 implementation is installed, a# graphical user interface is available for interactive# parameter adaption.## Not run:# Dependent on external softwarebaselineGUI(milk spectra)## End(Not run)baseline-classClass "baseline"DescriptionStores the result of estimating baselines for one or more spectra.Objects from the ClassThe normal way to create objects is with the function baseline. Several baseline algorithms areavailable. See baseline for details. There is a plot method for the class; see plot,baseline-method.

baseline.als7Slotsbaseline: A matrix with the estimated baselinescorrected: A matrix with the corrected spectraspectra: A matrix with the original spectracall: The call to baselineMethodsgetBaseline signature(object "baseline"): Extract the estimated baselinesgetCall signature(object "baseline"): Extract the call to baseline used to create the objectgetCorrected signature(object "baseline"): Extract the corrected spectragetSpectra signature(object "baseline"): Extract the original spectraWarningIn a future versoion, one of the slots might be removed from the class definition and calculatedon the fly instead, in order to save space. Therefore, do use the extractor functions (getSpectra,getBaseline and getCorrected) instead of accessing the slots directly.Author(s)Bjørn-Helge Mevik and Kristian Hovde LilandSee Alsobaseline, getBaseline, getSpectra, getCorrected, ymmetric Least SquaresDescriptionBaseline correction by 2nd derivative constrained weighted regression. Original algorithm proposedby Paul H. C. Eilers and Hans F.M. BoelensUsagebaseline.als(spectra, lambda 6, p 0.05, maxit 20)

8baseline.fillPeaksArgumentsspectraMatrix with spectra in rowslambda2nd derivative constraintpWeighting of positive residualsmaxitMaximum number of iterationsDetailsIterative algorithm applying 2nd derivative constraints. Weights from previous iteration is p forpositive residuals and 1-p for negative residuals.ValuebaselineMatrix of baselines corresponding to spectra spectracorrectedMatrix of baseline corrected spectrawgtsMatrix of final regression weightsAuthor(s)Kristian Hovde Liland and Bjørn-Helge MevikReferencesPaul H. C. Eilers and Hans F.M. Boelens: Baseline Correction with Asymmetric Least SquaresSmoothingExamplesdata(milk)bc.als - baseline(milk spectra[1,, drop FALSE], lambda 10, method 'als')## Not run:plot(bc.als)## End(Not run)baseline.fillPeaksFill peaksDescriptionAn iterative algorithm using suppression of baseline by means in local windowsUsagebaseline.fillPeaks(spectra, lambda, hwi, it, int)

baseline.irls9ArgumentsspectraMatrix with spectra in rowslambda2nd derivative penalty for primary smoothinghwiHalf width of local windowsitNumber of iterations in suppression loopintNumber of buckets to divide spectra intoDetailsIn local windows of buckets the minimum of the mean and the previous iteration is chosen as thenew baselineValuebaselineMatrix of baselines corresponding to spectra spectracorrectedMatrix of baseline corrected spectraAuthor(s)Kristian Hovde Liland and Bjørn-Helge MevikReferencesKristian Hovde Liland, 4S Peak Filling - baseline estimation by iterative mean suppression, MethodsX 2015Examplesdata(milk)bc.fillPeaks - baseline(milk spectra[1,, drop FALSE], lambda 6,hwi 50, it 10, int 2000, method 'fillPeaks')## Not run:plot(bc.fillPeaks)## End(Not run)baseline.irlsIterative Restricted Least SquaresDescriptionAn algorithm with primary smoothing and repeated baseline suppressions and regressions with 2ndderivative constraintUsagebaseline.irls(spectra, lambda1 5, lambda2 9, maxit 200, wi 0.05)

10baseline.lowpassArgumentsspectraMatrix with spectra in rowslambda12nd derivative constraint for primary smoothinglambda22nd derivative constraint for secondary smoothingmaxitMaximum number of iterationswiWeighting of positive residualsValuebaselineMatrix of baselines corresponding to spectra spectracorrectedMatrix of baseline corrected spectrasmoothedMatrix of primary smoothed spectraAuthor(s)Kristian Hovde Liland and Bjørn-Helge MevikExamplesdata(milk)bc.irls - baseline(milk spectra[1,, drop FALSE], method 'irls')## Not run:plot(bc.irls)## End(Not run)baseline.lowpassLow-pass FFT filterDescriptionAn algorithm for removing baselines based on Fast Fourier Transform filteringUsagebaseline.lowpass(spectra, steep 2, half 5)ArgumentsspectraMatrix with spectra in rowssteepSteepness of filter curvehalfHalf-way point of filter curveDetailsSince the scale of the spectra will be different after filtering, baselines will not be returned by thealgorithm

baseline.medianWindow11ValuebaselineMatrix of baselines corresponding to spectra spectracorrectedMatrix of baseline corrected spectraAuthor(s)Kristian Hovde Liland and Bjørn-Helge MevikReferencesAHMET K. ATAKAN, W. E. BLASS, and D. E. JENNINGS: Elimination of Baseline Variationsfrom a Recorded Spectrum by Ultra-low Frequency FilteringExamplesdata(milk)bc.lowpass - baseline(milk spectra[1,, drop FALSE], method 'lowpass')## Not run:plot(bc.lowpass)## End(Not run)baseline.medianWindowMedian windowDescriptionAn implementation and extention of Mark S. Friedrichs’ model-free algorithmUsagebaseline.medianWindow(spectra, hwm, hws, end)ArgumentsspectraMatrix with spectra in rowshwmWindow half width for local medianshwsWindow half width for local smoothing (optional)endOriginal endpoint handling (optional boolean)DetailsAn algorithm finding medians in local windows and smoothing with gaussian weightingValuebaselineMatrix of baselines corresponding to spectra spectracorrectedMatrix of baseline corrected spectra

12baseline.modpolyfitAuthor(s)Kristian Hovde Liland and Bjørn-Helge MevikReferencesMark S. Friedrichs: A model-free algorithm for the removal of baseline artifactsExamplesdata(milk)bc.medianWindow - baseline(milk spectra[1,, drop FALSE], hwm 300,method 'medianWindow')## Not run:plot(bc.medianWindow)## End(Not run)baseline.modpolyfitModified polynomial fittingDescriptionAn implementation of CHAD A. LIEBER and ANITA MAHADEVAN-JANSENs algorithm forpolynomial fitingUsagebaseline.modpolyfit(spectra, t, degree 4, tol 0.001, rep 100)ArgumentsspectraMatrix with spectra in rowstOptional vector of spectrum abcissadegreeDegree of polynomialtolTolerance of difference between iterationsrepMaximum number of iterationsDetailsPolynomial fitting with baseline suppression relative to original spectrumValuebaselineMatrix of baselines corresponding to spectra spectracorrectedMatrix of baseline corrected spectra

baseline.peakDetection13Author(s)Kristian Hovde Liland and Bjørn-Helge MevikReferencesCHAD A. LIEBER and ANITA MAHADEVAN-JANSEN: Automated Method for Subtraction ofFluorescence from Biological Raman SpectraExamplesdata(milk)bc.modpolyfit - baseline(milk spectra[1,, drop FALSE], method 'modpolyfit', deg 6)## Not run:plot(bc.modpolyfit)## End(Not run)baseline.peakDetectionSimultaneous Peak Detection and Baseline CorrectionDescriptionA translation from Kevin R. Coombes et al.’s MATLAB code for detecting peaks and ra, left, right, lwin, rwin, snminimum,mono 0, multiplier 5, left.right, lwin.rwin)ArgumentsspectraMatrix with spectra in rowsleftSmallest window size for peak widthsrightLargest window size for peak widthslwinSmallest window size for minimums and medians in peak removed spectrarwinLargest window size for minimums and medians in peak removed spectrasnminimumMinimum signal to noise ratio for accepting peaksmonoMonotonically decreasing baseline if mono 0multiplierInternal window size multiplierleft.rightSets eflt and right to value of left.rightlwin.rwinSets lwin and rwin to value of lwin.rwin

14baseline.rfbaselineDetailsPeak detection is done in several steps sorting out real peaks through different criteria. Peaks areremoved from spectra and minimums and medians are used to smooth the remaining parts of thespectra. If snminimum is omitted, y3, midspec, y and y2 are not returned (faster)ValuebaselineMatrix of baselines corresponding to spectra spectracorrectedMatrix of baseline corrected spectrapeaksFinal list of selected peakssnList signal to noise ratios for peaksy3List of peaks prior to singal to noise selectionmidspecMid-way baseline estimationyFirst estimate of peaksy2Second estimate of peaksAuthor(s)Kristian Hovde Liland and Bjørn-Helge MevikReferencesKEVIN R. COOMBES et al.: Quality control and peak finding for proteomics data collected fromnipple aspirate fluid by surface-enhanced laser desorption and ionization.Examplesdata(milk)bc.peakDetection - baseline(milk spectra[1,, drop FALSE], method 'peakDetection',left 300, right 300, lwin 50, rwin 50)## Not run:plot(bc.peakDetection)## End(Not run)baseline.rfbaselineRobust Baseline EstimationDescriptionWrapper for Andreas F. Ruckstuhl, Matthew P. Jacobson, Robert W. Field, James A. Dodd’s algorithm based on LOWESS and weighted regression

tra, span 2/3, NoXP NULL, maxit c(2, 2),b 3.5, weight NULL, Scale function(r) median(abs(r))/0.6745,delta NULL, SORT FALSE, DOT FALSE, init aSORTDOTinitMatrix with spectra in rowsAmount of smoothing (by fraction of points)Amount of smoothing (by number of points)Maximum number of iterations in robust fitTuning constant in the biweight functionOptional weights to be given to individual observationsS function specifying how to calculate the scale of the residualsNonnegative parameter which may be used to save computation. (See rfbaselineBoolean variable indicating whether x data must be sorted.Disregard outliers totally (boolean)Values of initial fitDetailsMost of the code is the original code as given by the authors. The ability to sort by X-values hasbeen removed and ability to handle multiple spectra has been addedValuebaselinecorrectedMatrix of baselines corresponding to spectra spectraMatrix of baseline corrected spectraAuthor(s)Kristian Hovde Liland and Bjørn-Helge MevikReferencesAndreas F. Ruckstuhl, Matthew P. Jacobson, Robert W. Field, James A. Dodd: Baseline subtractionusing robust local regression estimationExamplesdata(milk)bc.rbe - baseline(milk spectra[1,, drop FALSE], method 'rfbaseline',span NULL, NoXP 1000)## Not run:plot(bc.rbe)## End(Not run)

16baseline.rollingBallbaseline.rollingBallRolling ballDescriptionIdeas from Rolling Ball algorithm for X-ray spectra by M.A.Kneen and H.J. Annegarn. Variablewindow width has been left outUsagebaseline.rollingBall(spectra, wm, ws)ArgumentsspectraMatrix with spectra in rowswmWidth of local window for minimization/maximizationwsWidth of local window for smoothingValuebaselineMatrix of baselines corresponding to spectra spectracorrectedMatrix of baseline corrected spectraAuthor(s)Kristian Hovde Liland and Bjørn-Helge MevikReferencesM.A. Kneen, H.J. Annegarn: Algorithm for fitting XRF, SEM and PIXE X-ray spectra backgroundsExamplesdata(milk)bc.rollingBall - baseline(milk spectra[1,, drop FALSE], wm 200, ws 200,method 'rollingBall')## Not run:plot(bc.rollingBall)## End(Not run)

baseline.shirleybaseline.shirley17Shirley Background EstimationDescriptionShirley Background correction for X-ray Photoelectron Spectroscopy.Usagebaseline.shirley(spectra, t NULL, limits NULL, maxit 50, err 1e-6)Argumentsspectramatrix with only 1 y-coordinates by rows (i.e.: y spectra[1,])tOptional vector of spectrum abscissalimitslist with the y coordinates between calculation of background. Ususally theseare the extreme point of the data range.maxitmax number of iterationerrTolerance of difference between iterationsDetailsThe shape of the spectrum background or baseline is affected by inelastic energy loss processes,secondary electrons and nearby peaks. A reasonable approximation is essential for a qualitative andquantitative analysis of XPS data especially if several components interfere in one spectrum. Thechoice of an adequate background model is determined by the physical and

Package ‘baseline’ September 12, 2020 Encoding UTF-8 Type Package Title Baseline Correction of Spectra Version 1.3-1 Date 2020-09-10 Maintai

Related Documents:

provider specialty, index year (2014-17), baseline anxiety, baseline dyspnea, baseline congestive heart failure, baseline angina pectoris, baseline renal disease, baseline obstructive sleep apnea, baseline pneumonia, age, baseline Elixhauser comorbidity index score, baseline COPD total medical costs, baseline exacerbation episode

Package style descriptive code LQFP (low profile quad flat package) Package body material type P (plastic) JEDEC package outline code MS-026 BCD Mounting method type S (surface mount) Issue date 25-01-2016 Manufacturer package code 98ASS23234W Table 1. Package summary Parameter Min Nom Max Unit package length 9.8 10 10.2 mm package width 9.8 10 .

Examination Procedures Baseline Review CFPB April 2019 ECOA 1 Equal Credit Opportunity Act Baseline Review Modules These ECOA Baseline Review Modules consist of five modules that CFPB examination teams use to conduct ECOA Baseline Reviews to evaluate how institutions’ compliance management systems identify and manage fair lending risks under .

Multiple Baseline Designs Multiple baseline designs provide a means for collecting multiple sets of data in a single-case experimental design (Neu-man & McCormick, 1995). Kucera and Axelrod (1995) state multiple baseline designs are "particularly well-suited to lit-eracy research" (p. 47). The authors also maintain that multiple baseline .

be checked against facility-specific data to validate accuracy of information sent to CMS. CMS reports will be available to facilities using either Baseline 1or Baseline 2. Baseline 1 utilizes data from multiple pooled mean years while Baseline 2 utilizes data from the 2015 re -baseline data for

226 ABS - CBN News TFC Package 227 BRO TFC Package 228 MYX TFC Package 229 Cinema One Global TFC Package 230 DZMM Teleradyo TFC Package . 231 DWRR Radio TFC Package 233 Kapatid TV5 Y Y 235 Net-25 Y Y Y 261 NHK World Premium Y Y 275 SBTN SBTN 300 700 HBO HBO Package .

C h a p t e r 1 Salesforce Managed Package This chapter includes the following topics: Salesforce Managed Package Overview, 5 Salesforce Managed Package URLs, 5 Installing the Managed Package, 6 Uninstalling and Deleting the Managed Package, 9 More Information, 10 Salesforce Managed Package Overview You need the Informatica Cloud Real Time for Salesforce package (the .

additif alimentaire, exprimée sur la base du poids corporel, qui peut être ingérée chaque jour pendant toute une vie sans risque appréciable pour la santé.5 c) L’expression dose journalière admissible « non spécifiée » (NS)6 est utilisée dans le cas d’une substance alimentaire de très faible toxicité lorsque, au vu des données disponibles (chimiques, biochimiques .