microeco icon indicating copy to clipboard operation
microeco copied to clipboard

Query about threads and seeds in cal_powerlaw

Open Shawane-Wang opened this issue 1 year ago • 2 comments

Hi. I am asking about how can I add threads and seed parameter in the cal_powerlaw() to help accelarate the calculation and ensure P value from the test consistent among different attempts.

Shawane-Wang avatar Apr 04 '23 06:04 Shawane-Wang

Hi. In previous version, they are not considered and supported. I have updated the package in github and make the parameters pass to bootstrap_p function of poweRlaw package instead of previous fit_power_law function. You can reinstall your package from github to resolve this issue. To use multiple threads and fix seed, please run the function like this

t1$cal_powerlaw(threads = 4, seed = 1)

The threads and seed parameters both pass to bootstrap_p function of poweRlaw package.

ChiLiubio avatar Apr 04 '23 12:04 ChiLiubio

Great! I got it. Thanks!

Shawane-Wang avatar Apr 05 '23 13:04 Shawane-Wang