-
Notifications
You must be signed in to change notification settings - Fork 10
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
tag_outlier_windows does not perform as expected #113
Comments
This function is all kinds of screwed up as it's currently implemented. From what I understand, this was included in order to help us identify when the user might be performing the assay incorrectly. But -- as you've pointed out -- the false positive rate is through the roof. A potential problem I see with @itismeghasyam Can you think of another implementation that might be able to salvage the original intent for this function? Looking at the sample data included in the package, it seems like x and y axes are just noise and the z axis, had the phone been flipped, would have shifted from -1 to +1. Maybe we should only be looking at the z axis? But wouldn't the axes you check for outlier windows be assay specific as well? |
I understand that there might be an issue with the tremor being tagged as rotated, but it is unlikely. You have to remember that we are looking at the gravity component to see the tagging, not the accelerometer nor the gyroscope readings. And for the gravity component to give a false reading of a rotated phone when there is high acceleration, the tracking of gravity should be way off. This can happen only if we have very sharp jerk like readings (something akin to a staccato in a music score spectrogram), which is unlikely of a tremor (a phone drop on to the floor would simulate this sharp jerk like reading). We should look into this to figure out the threshold ranges, another way might be to estimate the rotation using the gyroscope reading(integrating the gyroscope angular velocity to get angular displacement), and to see the max deviation from the initial value (is it pi radians, or 0.5 radians) etc., and then decide on a threshold. |
At the very least, |
Right now
tag_outlier_windows
tags any window if any one of it's gravity components(x/y/z) changes sign. This is evident in the block of code below -->But this might be misleading because even if we have minor variations in the gravity axis (for x or y), we will still tag it as rotated within the window, an example of this is presented below
You'll see that the output says phone rotated within window for all, but this is not possible, since we are simulating for all practical purposes noise (the max of x, y is 0.01, min is -0.01). So I propose that instead of checking
error = sign(max) != sign(min)
, we check for something likeerror = ((max) - (min)) > rotation_threshold
, where we will definerotation_threshold
as a parameter in m/s^2. Something like a 0.5 or 1 maybe?. Maybe we can expose therotation_threshold
parameter to the users if we want toFeature request
Change the function to
The text was updated successfully, but these errors were encountered: