Suppose I have a (very large) noisy data set of points $(x_i, y_i)$ and I want to smooth it. Mathematica seems to have a number of smoothing schemes (EstimatedBackground[], ListConvolve[], etc) but they all seem to have the underlying assumption that the data is sampled at regular intervals (and thus, usually takes a flat list of numbers as input), which is not my case (nor, I suspect, is it the case particularly frequently). Is there some more or less standard way to deal with this?
Asked
Active
Viewed 358 times
4
Igor Rivin
- 5,094
- 20
- 19
2 Answers
4
Mathematica 10 has new interesting functions for irregularly spaced data like MovingMap
data = RandomReal[1, {1000, 2}];
ListLinePlot[MovingMap[Mean, data, {{0.1}}]]

ybeltukov
- 43,673
- 5
- 108
- 212
-
Aha! That could be what I am looking for, I will check it out and report! – Igor Rivin Oct 06 '14 at 19:07
-
-
2
Show[
ListPlot[#,
DataRange -> {0, 6 Pi},
PlotTheme -> "Detailed",
PlotStyle -> PointSize[Tiny]],
ListLinePlot[
MovingMap[Mean, #, {{250}, Center}, 0],
PlotStyle -> {Thick, Blue},
DataRange -> {0, 6 Pi}]] & [Table[Cos[x] + RandomReal[{-1, 1}], {x, 0, 6 Pi, 0.01}]]

eldo
- 67,911
- 5
- 60
- 168
-
-
On second thought, your data is actually regularly spaced (and so, just like the built-in stuff, you are not using the abscissas...) – Igor Rivin Oct 06 '14 at 21:04
FFT. – alancalvitti Oct 06 '14 at 17:25