How to optimize the parameters in fillgaps function?
2 次查看(过去 30 天)
显示 更早的评论
I would like to use fillgaps function and I tried with my data but the results were not good. I would like to change the number of samples to use in the estimation and also would like to change the model order which is the order of autoregressive model .I have done with different numbers but I was wondering if there is a way to try with different range of data to get the optimal number of model order and samples(parameters in an autoregressive model). Thanks in advance for any advice
4 个评论
John D'Errico
2016-8-10
To be honest, I'd just use my own inpaint_nans, which will replace the NaN elements with smoothly interpolated elements. Of course, if your time series is noisy, then you are best off using a tool that will do smoothing. Inpaint_nans will try to use the data to interpolate, but if there is noise, then the interpolant will be bumpy near the edges of the holes. So I'd not bother with inpaint_nans on a noisy series.
The problem with telling you what to do is the parameters will be problem dependent, and we don't see your data. Nor do we know what was unsatisfactory about the results. My guess is your data is noisy. If it was smooth, then almost anything would work well.
Sadly, I don't think there is some simple formula to know what parameters to use. If there was, the author would have used it.
You might get a better answer if you are willing to post some data, and show how you called fillgaps. Then say what you were unhappy with about the results as you used it.
回答(1 个)
Greg Dionne
2016-10-21
编辑:Greg Dionne
2016-10-21
I find the default values work for me; but sometimes if I have a big signal with lots of missing values, limiting the length of the regression is helpful if all I want is a quick answer. Ideally the length would be just enough to cover the portion of the signal that has a constant AR model. If I'm missing a portion of a slowly varying oscillation, I use a larger value to cover a few cycles of it. If instead I'm missing just a portion of a decaying signal, then I keep the length to be within the decaying portion.
As for order, that can vary. I often start low at first, then increase. Most of the audio clips I tested tended to top out around an order of 200.
If you're looking at something that can just interpolate a couple of points that aren't oscillating much (if at all), then take a look at fillmissing.
Let us know what you tried and share your data if you can.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Earth and Planetary Science 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!