Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modify the entropy function be able to compute vectorizly #14

Open
cheliu-computation opened this issue Dec 27, 2021 · 2 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@cheliu-computation
Copy link
Contributor

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 che.liu21@imperial.ac.uk, welcome to discuss with me!

@raphaelvallat raphaelvallat self-assigned this Dec 27, 2021
@raphaelvallat raphaelvallat added the enhancement New feature or request label Dec 27, 2021
@raphaelvallat
Copy link
Owner

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

@cheliu-computation
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants