Comments (2)
Thank you for the thorough explanation. I really appreciate it!
I understand your concern about the potential problems of comparing sample entropy values from trials with different r-tresholds, thanks for highlighting it. After looking at sample_entropy for some now, I think that it is a less straightforward to interpret parameter (with many tuning options), which also produces NaN-values or Inf-values for some trials. So I might stick with x- & y-flips, angles and straight line deviations for potential movement-accuracy measures of a simple point-and-click task.
from mousetrap.
Hi there,
that's a good point! I'll try to address it in several steps:
1) Current implementation
Yes, the implementation is as you describe it ("you calculate r using the standard deviation of the x-position difference data across all trials") and as intended (i.e., not a bug).
2) Rationale behind it
I tried to implement sample entropy like Hehman et al. (2015) described it. I agree with you that the description in the paper is not very explicit "... within a tolerance of .2 multiplied by the standard deviation of the x-shifts (the method employed
in our Python script in the Supplementary Material)" (p. 394). But, as you pointed out, this becomes more clear in the supplementary material ("Recommended tolerance r is the standard deviation of x-shifts (Δx) across conditions"). They also provide a link to a Python script within the supplementary material (https://github.com/rystoli/psychtools/blob/master/MT/SampEn.py). Unfortunately, this file does not seem to be online anymore but back in the day, when I implemented the function, I downloaded their script and this included an example code which, to my understanding, makes it explicit that they intended the SD to be computed across all trials:
#make fake test trajectories:
#typical = sort([randint(0,150)*.01 for i in xrange(101)])
#atypical = sort([randint(0,150)*.01 for i in xrange(101)])
#sample call: SampEn(typical,3,.2*std(xshifts(typical)+xshifts(atypical)))
3) Which approach is better?
To be honest, I don't have a strong opinion on that as I never really used sample entropy in my own research projects (when I was still doing research). However, I believe that the approach that you describe has one drawback in that the sample entropy values are less comparable between trials if you vary the tolerance value (r) between trials. I see that it could make sense to compute the SD per trial, but maybe one could then average the SD values across trials in a second step and use this average SD as the tolerance value for all trials?
Best,
Pascal
from mousetrap.
Related Issues (16)
- documentation HOT 1
- vectorize the function point_to_line() for time speed up HOT 2
- reshape data in long format to data in mousetrap format as array HOT 1
- compare measures for reset_timestamps = FALSE with and without extra timestamp 0 HOT 2
- mousetrap-measures computed on irregular and on equidistant versions of the trajectories HOT 2
- idle time for mouse-trajectories with sampling rate depending on movement HOT 8
- mt_align_start_end() introduces NaNs and -Infs HOT 3
- Weird "_ideal" values calculated by mt_deviations() HOT 3
- Error in dimnames(trajectories)[[3]] : subscript out of bounds HOT 4
- mt_diffmap error "Determine joint bounds Error in x[, , dimensions[1]] : incorrect number of dimensions" and "Error in x[[use]][!condition, , ]: (subscript) logical subscript too long" HOT 2
- mt_exclude_initiation not working HOT 3
- Angle calculation for only one row of data HOT 1
- mt_import_long imports the wrong trajectories when mt_id_label contains mixed case data HOT 1
- make it available in python as well HOT 1
- even though derivatives() is applied before measures() - the distance, velocity and acceleration are not calculated HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mousetrap.