You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Where does the check for "enough data points to continue" come from? What I've noticed:
Instead of using a KNN search (as the Rosenstein algorithm does) the lyap_r function replaces distances with Inf, which, although, makes sense when looking for the minimum value that is at least min_tsep away in index. However, this code seems to ignore the case where min_tsep is the same size as ntraj. If the minimum separation is too large, MATLAB's_ lyapunovExponent, defaults the minimum separation to ntraj. When this happens, there are no nearest neighbors, so to find a neighbor, the algorithm takes the furthest neighbor. This case is not reflected in this code.
I have found that as long as min_tsep <= ((len(data) - (embed_dim - 1) * lag) - expan_rng + 1) - 2) /2, then the algorithm will run. In fact, nolds and MATLAB match for these cases, but not when min_tsep is greater.
The default for nolds is 25% of the length of the data, which ensure the above condition, but MATLAB's KNN overwrites the minimum separation to (len(data) - (embed_dim - 1) * lag) - expan_rng + 1), which is the max index.
The text was updated successfully, but these errors were encountered:
Where does the check for "enough data points to continue" come from? What I've noticed:
Instead of using a KNN search (as the Rosenstein algorithm does) the lyap_r function replaces distances with Inf, which, although, makes sense when looking for the minimum value that is at least min_tsep away in index. However, this code seems to ignore the case where min_tsep is the same size as ntraj. If the minimum separation is too large, MATLAB's_ lyapunovExponent, defaults the minimum separation to ntraj. When this happens, there are no nearest neighbors, so to find a neighbor, the algorithm takes the furthest neighbor. This case is not reflected in this code.
I have found that as long as min_tsep <= ((len(data) - (embed_dim - 1) * lag) - expan_rng + 1) - 2) /2, then the algorithm will run. In fact, nolds and MATLAB match for these cases, but not when min_tsep is greater.
The default for nolds is 25% of the length of the data, which ensure the above condition, but MATLAB's KNN overwrites the minimum separation to (len(data) - (embed_dim - 1) * lag) - expan_rng + 1), which is the max index.
The text was updated successfully, but these errors were encountered: