shaheen-syed / ActiGraph-ActiWave-Analysis

Analyze raw data from ActiGraph and ActiWave devices
11 stars 3 forks source link

Wear time showing 24 hours for almost 0 count day #3

Open kaitlinsinger1 opened 3 months ago

kaitlinsinger1 commented 3 months ago

Hello, I'm seeing a weird pattern where the algorithm is labeling many 0 count minutes as wear time. wear_day = choi_2011.choi_2011_calculate_non_wear_time(final_array, raw_data_min_grouped.index), where final array is X data from an AGD file, X/Z are an appended dummy array of 0s. It seemed like I needed to have some value in X,Y,Z for the algorithm to run.

You can see in the table below for 5/8:

image

Then when I plot the counts over the day I just see one spike:

image

I adjusted the hyperparameters with no luck. I've seen this in quite a few of my files and it's generally at the end of the file after a period of very low wear days. Do you have any idea why this is happening/how to fix?

Thanks, Kaitlin

Trybnetic commented 2 months ago

Hi Kaitlin,

I am not sure whether I understand your issue correctly. I am currently self trying to make things run properly, so I am also not 100% sure whether I can help you.

First of all, the required input for choi_2011_calculate_non_wear_time are data and time. data is supposed to be a numpy array of the shape (n_samples, 3). This means this array should be the content of your AGD file aggregated on 1min epochs. time, on the other hand, is supposed to be the corresponding array of timestamps and accordingly (n_samples, 1).

With your shown table and plot, I am not sure what your issue there is as it does not become clear what is shown their nor what it is that you are exactly wondering about?

Best Marc