CSchoel / nolds

Nonlinear measures for dynamical systems (based on one-dimensional time series)
MIT License
255 stars 57 forks source link

some problem with nolds.hurst_rs() i ran the function in a loop for 20 times with same data and it give me different values. I even done it with out the round() function still same problem #22

Closed Krishnanunnis closed 3 years ago

Krishnanunnis commented 3 years ago

image

CSchoel commented 3 years ago

Hey, @Krishnanunnis . Sorry, I somehow completely missed this issue! :see_no_evil:

The reason for this behavior is that hurst_rs uses the RANSAC algorithm for line fitting. This algorithm uses pseudorandom numbers to exclude outliers from the fitting procedure. If you use the keyword argument fit="poly" instead, the result should be perfectly deterministic.

I might consider reverting the default to "poly", since you are the second person that ran into this issue and RANSAC is not part of the standard definition of the algorithm. But since this is only a question of defaults and not a bug, I will close the issue for now.