Closed alexander-myltsev closed 3 years ago
Hosking's method is O(N^2). You will get must faster realizations using the Davies-Harte method which is O(NlogN). Have you tried using it instead?
The code looks good to me. I maintain a more general package https://github.com/crflynn/stochastic which also support fBm. I don't plan on maintaining the fBm package since it's superceded by the stochastic package.
Hi @crflynn , Thanks for your reply.
@crflynn , I have a task as follows.
I have an FBM trajectory of, say, 100 points each. Then I need to take, say, 80 values and generate from scratch the rest of 20 values. In other words, I need to generate a new FBM trajectory that matches at first 80 values from the first trajectory. It's obvious for me how to achieve it with Hosking method: I store first 80 values, then add 20 more at the last nested for
loop.
On the other hand, Davies-Harte is much faster. I don't understand how to do it with Fourie transform. Do you think it's possible?
AFAIK this would only be possible using Hosking's method.
Thanks for the library. I needed to generate multiple FBM instances at the same time. I used your original implementation, but it appeared too slow since there is too much preliminary work.
My implementation than generates [m x n] matrix:
Feel free to include it to your codebase if you wish.