antropy
antropy copied to clipboard
modify the entropy function be able to compute vectorizly
Hi, I have used your package to process the ECG signal and it achieve good results on classify different heart disease. Thanks a lot!
However, so far, these functions are only can deal with one-dimensional signal like array(~, 1). May I take a try to modify the code and make it can process the data like sklearn.preprocessing.scale(X, axis=xx)? So it will be more efficient to deal with big array, because we do not need to run the foor loop or something else.
My email is [email protected], welcome to discuss with me!
Hi @cheliu-computation,
Thanks for opening the issue. Actually, some functions can handle multi-dimensional array and already have the axis
argument, e.g. hjorth_params, num_zerocross, katz_fd.
Adding support for multidimensional array for the other functions will be more tricky, especially because several of these functions are based on Numba and the current implementation only supports 1D array. I think it will be a lot of work, but please feel free to give it a try.
A "cheating" approach for this could be to internally implement a call to numpy.apply_along_axis. However, this will not increase computation time compared to a standard for loop.
Thanks, Raphael
Thanks for reply! I will try my best and upload the code for review. I will start with the perm_entropy and several entrop calculation function.