Fitting noise with Levenberg–Marquardt algorithm

255 Views Asked by At

I've got a sample of noise from a microphone, and I'm trying to fit a curve to the data using the Levenberg–Marquardt algorithm. However, I can't seem to find a good starting function.

I've tried a couple different ones, like the example on the wiki page: $F(x) = A\cos(Bx) + B\sin(Ax)$. The biggest problem with this is that I get harmonic areas where the two components cancel themselves out. I might be able to reduce this by adding more sin and cos terms, but I figured I'd come ask here first, as I'm sure you guys would know much better than me.

I'm actually not even sure if what I'm doing is feasible. I'm worried that microphone noise might be too random to fit, even with a great starting function. What do you guys think?

Edit: Looking at it a little more, it does seem to be too random. I was hoping that a few frequencies might stand out enough to fit the curve, but that doesn't seem to be the case. I suppose you could give it a starting function with several dozen sine waves added together, but then the algorithm would become far too slow to be practical. :/