Smooth signal with peaks using nonparametric method
Yout = mslowess(
|Vector of separation-unit values for
a set of signals with peaks. The number of elements in the vector
equals the number of rows in the matrix |
|Matrix of intensity values for a set
of peaks that share the same separation-unit range. Each row corresponds
to a separation-unit value, and each column corresponds to either
a set of signals with peaks or a retention time. The number of rows
equals the number of elements in vector |
Use the following syntaxes with data from any separation technique that produces signal data, such as spectroscopy, NMR, electrophoresis, chromatography, or mass spectrometry.
raw noisy signal data,
Yout = mslowess(
a locally weighted linear regression (Lowess) method with a default
mslowess assumes the input vector,
may not have uniformly spaced separation units. Therefore, the sliding
window for smoothing is centered using the closest samples in terms
X value and not in terms of the
When the input vector,
X, does not
have repeated values or NaN values, the algorithm is approximately
twice as fast.
mslowess with optional properties
that use property name/property value pairs. You can specify one or
more properties in any order. Each
be enclosed in single quotation marks and is case insensitive. These
property name/property value pairs are as follows:
mslowess(..., 'Order', specifies the order (
of the Lowess smoother. Enter
1 (linear polynomial
fit or Lowess),
2 (quadratic polynomial fit or
0 (equivalent to a weighted local mean
estimator and presumably faster because only a mean computation is
performed instead of a least-squares regression). The default value
Curve Fitting Toolbox™ software also refers to Lowess smoothing
2 as Loess smoothing.
mslowess(..., 'Span', specifies the window size for the smoothing kernel.
1, the window is equal to
of samples independent of the separation-unit vector,
The default value is
10 samples. Higher values
will smooth the signal more at the expense of computation time. If
1, the window size is taken to be a fraction
of the number of points in the data. For example, when
the window size is equal to
0.50% of the number
of points in
selects the function specified by
KernelValue for weighting
the observed intensities. Samples close to the separation-unit location being smoothed
have the most weight in determining the estimate.
can be any of the following character vectors (or strings):
(1 - (dist/dmax).^3).^3
mslowess(..., 'RobustIterations', specifies the number of iterations (
for a robust fit. If
no robust fit is performed. For robust smoothing, small residual values
at every span are outweighed to improve the new estimate.
iterations are usually adequate, while larger values might be computationally
X vector that has uniformly
spaced separation units, a nonrobust smoothing with
0 is equivalent to filtering the signal with
the kernel vector.
mslowess(..., 'ShowPlot', plots the smoothed signal over the original signal.
When you call
mslowess without output arguments,
the signals are plotted unless
only the first signal in
ShowPlotValue can also contain
an index to one of the signals in
Load a MAT-file, included with the Bioinformatics Toolbox™ software, that contains some sample data.
Smooth the spectra and draw a figure of the first spectrum with original and smoothed signals.
YS = mslowess(MZ_lo_res,Y_lo_res,'Showplot',true);
Zoom in on a region of the figure to see the difference in the original and smoothed signals.
axis([7350 7550 0.1 1.0])
- Mass Spectrometry and Bioanalytics
- Preprocessing Raw Mass Spectrometry Data
- Visualizing and Preprocessing Hyphenated Mass Spectrometry Data Sets for Metabolite and Protein/Peptide Profiling
- Differential Analysis of Complex Protein and Metabolite Mixtures using Liquid Chromatography/Mass Spectrometry (LC/MS)