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!