-
Notifications
You must be signed in to change notification settings - Fork 102
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
Mse fix #58
Mse fix #58
Conversation
Trying to replicate methods from another study I realized that there may be issues with this and the pyentrp implementations of MSE. emb_dim is the length of the vectors to compare. However, in this implementation it is used as the scale_factor as defined in the literature. It appears that the true place that emb_dim should be placed (in the sample entropy calculation) is hard coded as one. I have added a new input called max_scale_factor (tau in the costa paper referenced) - this will ensure that the for loop iterates over all scales between 1 and the inputted max_scale_factor. I placed the emb_dim in the locations it should be in the sample entropy function (replacing the hard coded 1). Last, I think the output of this function is incorrect. From my brief viewing of the literature it seems there are two general outputs that may be used. 1) the sample entropy for each of the individual scale_factors (1:max_scale_factor defined above), or 2) the area under a curve created by these individual scale factors. I have added a variable that allows the user to output either a single value, or the data from all of the scale_factors. I have not changed the output of the individual value that is outputted, but have included a comment with that I think is going on and a one line implementation that I beleive will produce the area output described.
output both the coarse grained entropy data, as well as the area under the curve as output. Update the documentation within the function to identify what the function does and the inputs/outputs. Updated to add self to contributors.
Beside fixing testing, I've also added some minor changes:
What do you think of these changes? |
I've checked out the commit and everything looks good to me. |
It is merged 🎉 |
Awesome! Thanks for including me in the process. I do most of my coding and work independently, so it's great to learn and see how others do things, thanks for maintaining this. |
Do not hesitate if you have other suggestions or ideas ;) cheers |
Follow up of #57
Fixing multiscale entropy