Deployed 57c9fea to 0.1 with MkDocs 1.1.2 and mike 0.5.5

pull/106/head
github-actions 2020-12-02 23:58:16 +00:00
parent 40265f3e09
commit eba8d1dff0
54 changed files with 408 additions and 396 deletions

View File

@ -1103,12 +1103,12 @@
<p>Add your provider <strong>function</strong> in your provider script. The name of such function should be <code>[providername]_features</code>, in our example <code>vega_features</code></p>
<div class="admonition info">
<p class="admonition-title">Python function</p>
<div class="highlight"><pre><span></span><code><span class="k">def</span> <span class="p">[</span><span class="n">providername</span><span class="p">]</span><span class="n">_features</span><span class="p">(</span><span class="n">sensor_data_files</span><span class="p">,</span> <span class="n">day_segment</span><span class="p">,</span> <span class="n">provider</span><span class="p">,</span> <span class="n">filter_data_by_segment</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<div class="highlight"><pre><span></span><code><span class="k">def</span> <span class="p">[</span><span class="n">providername</span><span class="p">]</span><span class="n">_features</span><span class="p">(</span><span class="n">sensor_data_files</span><span class="p">,</span> <span class="n">time_segment</span><span class="p">,</span> <span class="n">provider</span><span class="p">,</span> <span class="n">filter_data_by_segment</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
</code></pre></div>
</div>
<div class="admonition info">
<p class="admonition-title">R function</p>
<div class="highlight"><pre><span></span><code><span class="p">[</span><span class="n">providername</span><span class="p">]</span>_<span class="n">features</span> <span class="o">&lt;-</span> <span class="nf">function</span><span class="p">(</span><span class="n">sensor_data</span><span class="p">,</span> <span class="n">day_segment</span><span class="p">,</span> <span class="n">provider</span><span class="p">)</span>
<div class="highlight"><pre><span></span><code><span class="p">[</span><span class="n">providername</span><span class="p">]</span>_<span class="n">features</span> <span class="o">&lt;-</span> <span class="nf">function</span><span class="p">(</span><span class="n">sensor_data</span><span class="p">,</span> <span class="n">time_segment</span><span class="p">,</span> <span class="n">provider</span><span class="p">)</span>
</code></pre></div>
</div>
</li>
@ -1128,8 +1128,8 @@
<td>Path to the CSV file containing the data of a single participant. This data has been cleaned and preprocessed. Your function will be automatically called for each participant in your study (in the <code>[PIDS]</code> array in <code>config.yaml</code>)</td>
</tr>
<tr>
<td><code>day_segment</code></td>
<td>The label of the day segment that should be processed.</td>
<td><code>time_segment</code></td>
<td>The label of the time segment that should be processed.</td>
</tr>
<tr>
<td><code>provider</code></td>
@ -1154,31 +1154,31 @@
</code></pre></div>
<p>Note that phone&rsquo;s battery, screen, and activity recognition data is given as episodes instead of event rows (for example, start and end timestamps of the periods the phone screen was on)</p>
</details>
<details class="info"><summary>2. Filter your data to process only those rows that belong to <code>day_segment</code></summary><p>This step is only one line of code, but to undersand why we need it, keep reading.
<div class="highlight"><pre><span></span><code><span class="n">acc_data</span> <span class="o">=</span> <span class="n">filter_data_by_segment</span><span class="p">(</span><span class="n">acc_data</span><span class="p">,</span> <span class="n">day_segment</span><span class="p">)</span>
<details class="info"><summary>2. Filter your data to process only those rows that belong to <code>time_segment</code></summary><p>This step is only one line of code, but to undersand why we need it, keep reading.
<div class="highlight"><pre><span></span><code><span class="n">acc_data</span> <span class="o">=</span> <span class="n">filter_data_by_segment</span><span class="p">(</span><span class="n">acc_data</span><span class="p">,</span> <span class="n">time_segment</span><span class="p">)</span>
</code></pre></div></p>
<p>You should use the <code>filter_data_by_segment()</code> function to process and group those rows that belong to each of the <a href="../../setup/configuration/#day-segments">day segments RAPIDS could be configured with</a>.</p>
<p>Let&rsquo;s understand the <code>filter_data_by_segment()</code> function with an example. A RAPIDS user can extract features on any arbitrary <a href="../../setup/configuration/#day-segments">day segment</a>. A day segment is a period of time that has a label and one or more instances. For example, the user (or you) could have requested features on a daily, weekly, and week-end basis for <code>p01</code>. The labels are arbritrary and the instances depend on the days a participant was monitored for: </p>
<p>You should use the <code>filter_data_by_segment()</code> function to process and group those rows that belong to each of the <a href="../../setup/configuration/#time-segments">time segments RAPIDS could be configured with</a>.</p>
<p>Let&rsquo;s understand the <code>filter_data_by_segment()</code> function with an example. A RAPIDS user can extract features on any arbitrary <a href="../../setup/configuration/#time-segments">time segment</a>. A time segment is a period of time that has a label and one or more instances. For example, the user (or you) could have requested features on a daily, weekly, and week-end basis for <code>p01</code>. The labels are arbritrary and the instances depend on the days a participant was monitored for: </p>
<ul>
<li>the daily segment could be named <code>my_days</code> and if <code>p01</code> was monitored for 14 days, it would have 14 instances</li>
<li>the weekly segment could be named <code>my_weeks</code> and if <code>p01</code> was monitored for 14 days, it would have 2 instances.</li>
<li>the weekend segment could be named <code>my_weekends</code> and if <code>p01</code> was monitored for 14 days, it would have 2 instances.</li>
</ul>
<p>For this example, RAPIDS will call your provider function three times for <code>p01</code>, once where <code>day_segment</code> is <code>my_days</code>, once where <code>day_segment</code> is <code>my_weeks</code> and once where <code>day_segment</code> is <code>my_weekends</code>. In this example not every row in <code>p01</code>&lsquo;s data needs to take part in the feature computation for either segment <strong>and</strong> the rows need to be grouped differently. </p>
<p>Thus <code>filter_data_by_segment()</code> comes in handy, it will return a data frame that contains the rows that were logged during a day segment plus an extra column called <code>local_segment</code>. This new column will have as many unique values as day segment instances exist (14, 2, and 2 for our <code>p01</code>&lsquo;s <code>my_days</code>, <code>my_weeks</code>, and <code>my_weekends</code> examples). After filtering, <strong>you should group the data frame by this column and compute any desired features</strong>, for example:</p>
<p>For this example, RAPIDS will call your provider function three times for <code>p01</code>, once where <code>time_segment</code> is <code>my_days</code>, once where <code>time_segment</code> is <code>my_weeks</code> and once where <code>time_segment</code> is <code>my_weekends</code>. In this example not every row in <code>p01</code>&lsquo;s data needs to take part in the feature computation for either segment <strong>and</strong> the rows need to be grouped differently. </p>
<p>Thus <code>filter_data_by_segment()</code> comes in handy, it will return a data frame that contains the rows that were logged during a time segment plus an extra column called <code>local_segment</code>. This new column will have as many unique values as time segment instances exist (14, 2, and 2 for our <code>p01</code>&lsquo;s <code>my_days</code>, <code>my_weeks</code>, and <code>my_weekends</code> examples). After filtering, <strong>you should group the data frame by this column and compute any desired features</strong>, for example:</p>
<div class="highlight"><pre><span></span><code><span class="n">acc_features</span><span class="p">[</span><span class="s2">&quot;maxmagnitude&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">acc_data</span><span class="o">.</span><span class="n">groupby</span><span class="p">([</span><span class="s2">&quot;local_segment&quot;</span><span class="p">])[</span><span class="s2">&quot;magnitude&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">max</span><span class="p">()</span>
</code></pre></div>
<p>The reason RAPIDS does not filter the participant&rsquo;s data set for you is because your code might need to compute something based on a participant&rsquo;s complete dataset before computing their features. For example, you might want to identify the number that called a participant the most throughout the study before computing a feature with the number of calls the participant received from this number.</p>
</details>
<details class="info"><summary>3. Return a data frame with your features</summary><p>After filtering, grouping your data, and computing your features, your provider function should return a data frame that has:</p>
<ul>
<li>One row per day segment instance (e.g. 14 our <code>p01</code>&lsquo;s <code>my_days</code> example)</li>
<li>One row per time segment instance (e.g. 14 our <code>p01</code>&lsquo;s <code>my_days</code> example)</li>
<li>The <code>local_segment</code> column added by <code>filter_data_by_segment()</code></li>
<li>One column per feature. By convention the name of your features should only contain letters or numbers (<code>feature1</code>). RAPIDS will automatically add the right sensor and provider prefix (<code>phone_accelerometr_vega_</code>)</li>
</ul>
</details>
<details class="example"><summary><code>PHONE_ACCELEROMETER</code> Provider Example</summary><p>For your reference, this a short example of our own provider (<code>RAPIDS</code>) for <code>PHONE_ACCELEROMETER</code> that computes five acceleration features</p>
<div class="highlight"><pre><span></span><code><span class="k">def</span> <span class="nf">rapids_features</span><span class="p">(</span><span class="n">sensor_data_files</span><span class="p">,</span> <span class="n">day_segment</span><span class="p">,</span> <span class="n">provider</span><span class="p">,</span> <span class="n">filter_data_by_segment</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<div class="highlight"><pre><span></span><code><span class="k">def</span> <span class="nf">rapids_features</span><span class="p">(</span><span class="n">sensor_data_files</span><span class="p">,</span> <span class="n">time_segment</span><span class="p">,</span> <span class="n">provider</span><span class="p">,</span> <span class="n">filter_data_by_segment</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="n">acc_data</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">read_csv</span><span class="p">(</span><span class="n">sensor_data_files</span><span class="p">[</span><span class="s2">&quot;sensor_data&quot;</span><span class="p">])</span>
<span class="n">requested_features</span> <span class="o">=</span> <span class="n">provider</span><span class="p">[</span><span class="s2">&quot;FEATURES&quot;</span><span class="p">]</span>
@ -1189,7 +1189,7 @@
<span class="n">acc_features</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">(</span><span class="n">columns</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;local_segment&quot;</span><span class="p">]</span> <span class="o">+</span> <span class="n">features_to_compute</span><span class="p">)</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">acc_data</span><span class="o">.</span><span class="n">empty</span><span class="p">:</span>
<span class="n">acc_data</span> <span class="o">=</span> <span class="n">filter_data_by_segment</span><span class="p">(</span><span class="n">acc_data</span><span class="p">,</span> <span class="n">day_segment</span><span class="p">)</span>
<span class="n">acc_data</span> <span class="o">=</span> <span class="n">filter_data_by_segment</span><span class="p">(</span><span class="n">acc_data</span><span class="p">,</span> <span class="n">time_segment</span><span class="p">)</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">acc_data</span><span class="o">.</span><span class="n">empty</span><span class="p">:</span>
<span class="n">acc_features</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">()</span>

View File

@ -1016,9 +1016,9 @@
</details>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments</p>
<p class="admonition-title">Available time segments</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
</ul>
</div>
<div class="admonition info">
@ -1062,52 +1062,52 @@
<tr>
<td>maxhr</td>
<td>beats/mins</td>
<td>The maximum heart rate during a day segment.</td>
<td>The maximum heart rate during a time segment.</td>
</tr>
<tr>
<td>minhr</td>
<td>beats/mins</td>
<td>The minimum heart rate during a day segment.</td>
<td>The minimum heart rate during a time segment.</td>
</tr>
<tr>
<td>avghr</td>
<td>beats/mins</td>
<td>The average heart rate during a day segment.</td>
<td>The average heart rate during a time segment.</td>
</tr>
<tr>
<td>medianhr</td>
<td>beats/mins</td>
<td>The median of heart rate during a day segment.</td>
<td>The median of heart rate during a time segment.</td>
</tr>
<tr>
<td>modehr</td>
<td>beats/mins</td>
<td>The mode of heart rate during a day segment.</td>
<td>The mode of heart rate during a time segment.</td>
</tr>
<tr>
<td>stdhr</td>
<td>beats/mins</td>
<td>The standard deviation of heart rate during a day segment.</td>
<td>The standard deviation of heart rate during a time segment.</td>
</tr>
<tr>
<td>diffmaxmodehr</td>
<td>beats/mins</td>
<td>The difference between the maximum and mode heart rate during a day segment.</td>
<td>The difference between the maximum and mode heart rate during a time segment.</td>
</tr>
<tr>
<td>diffminmodehr</td>
<td>beats/mins</td>
<td>The difference between the mode and minimum heart rate during a day segment.</td>
<td>The difference between the mode and minimum heart rate during a time segment.</td>
</tr>
<tr>
<td>entropyhr</td>
<td>nats</td>
<td>Shannons entropy measurement based on heart rate during a day segment.</td>
<td>Shannons entropy measurement based on heart rate during a time segment.</td>
</tr>
<tr>
<td>minutesonZONE</td>
<td>minutes</td>
<td>Number of minutes the users heart rate fell within each <code>heartrate_zone</code> during a day segment.</td>
<td>Number of minutes the users heart rate fell within each <code>heartrate_zone</code> during a time segment.</td>
</tr>
</tbody>
</table>

View File

@ -1028,7 +1028,7 @@
</details>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments</p>
<p class="admonition-title">Available time segments</p>
<ul>
<li>Only available for segments that span 1 or more complete days (e.g. Jan 1<sup>st</sup> 00:00 to Jan 3<sup>rd</sup> 23:59)</li>
</ul>
@ -1074,82 +1074,82 @@
<tr>
<td>maxrestinghr</td>
<td>beats/mins</td>
<td>The maximum daily resting heart rate during a day segment.</td>
<td>The maximum daily resting heart rate during a time segment.</td>
</tr>
<tr>
<td>minrestinghr</td>
<td>beats/mins</td>
<td>The minimum daily resting heart rate during a day segment.</td>
<td>The minimum daily resting heart rate during a time segment.</td>
</tr>
<tr>
<td>avgrestinghr</td>
<td>beats/mins</td>
<td>The average daily resting heart rate during a day segment.</td>
<td>The average daily resting heart rate during a time segment.</td>
</tr>
<tr>
<td>medianrestinghr</td>
<td>beats/mins</td>
<td>The median of daily resting heart rate during a day segment.</td>
<td>The median of daily resting heart rate during a time segment.</td>
</tr>
<tr>
<td>moderestinghr</td>
<td>beats/mins</td>
<td>The mode of daily resting heart rate during a day segment.</td>
<td>The mode of daily resting heart rate during a time segment.</td>
</tr>
<tr>
<td>stdrestinghr</td>
<td>beats/mins</td>
<td>The standard deviation of daily resting heart rate during a day segment.</td>
<td>The standard deviation of daily resting heart rate during a time segment.</td>
</tr>
<tr>
<td>diffmaxmoderestinghr</td>
<td>beats/mins</td>
<td>The difference between the maximum and mode daily resting heart rate during a day segment.</td>
<td>The difference between the maximum and mode daily resting heart rate during a time segment.</td>
</tr>
<tr>
<td>diffminmoderestinghr</td>
<td>beats/mins</td>
<td>The difference between the mode and minimum daily resting heart rate during a day segment.</td>
<td>The difference between the mode and minimum daily resting heart rate during a time segment.</td>
</tr>
<tr>
<td>entropyrestinghr</td>
<td>nats</td>
<td>Shannons entropy measurement based on daily resting heart rate during a day segment.</td>
<td>Shannons entropy measurement based on daily resting heart rate during a time segment.</td>
</tr>
<tr>
<td>sumcaloriesZONE</td>
<td>cals</td>
<td>The total daily calories burned within <code>heartrate_zone</code> during a day segment.</td>
<td>The total daily calories burned within <code>heartrate_zone</code> during a time segment.</td>
</tr>
<tr>
<td>maxcaloriesZONE</td>
<td>cals</td>
<td>The maximum daily calories burned within <code>heartrate_zone</code> during a day segment.</td>
<td>The maximum daily calories burned within <code>heartrate_zone</code> during a time segment.</td>
</tr>
<tr>
<td>mincaloriesZONE</td>
<td>cals</td>
<td>The minimum daily calories burned within <code>heartrate_zone</code> during a day segment.</td>
<td>The minimum daily calories burned within <code>heartrate_zone</code> during a time segment.</td>
</tr>
<tr>
<td>avgcaloriesZONE</td>
<td>cals</td>
<td>The average daily calories burned within <code>heartrate_zone</code> during a day segment.</td>
<td>The average daily calories burned within <code>heartrate_zone</code> during a time segment.</td>
</tr>
<tr>
<td>mediancaloriesZONE</td>
<td>cals</td>
<td>The median of daily calories burned within <code>heartrate_zone</code> during a day segment.</td>
<td>The median of daily calories burned within <code>heartrate_zone</code> during a time segment.</td>
</tr>
<tr>
<td>stdcaloriesZONE</td>
<td>cals</td>
<td>The standard deviation of daily calories burned within <code>heartrate_zone</code> during a day segment.</td>
<td>The standard deviation of daily calories burned within <code>heartrate_zone</code> during a time segment.</td>
</tr>
<tr>
<td>entropycaloriesZONE</td>
<td>nats</td>
<td>Shannons entropy measurement based on daily calories burned within <code>heartrate_zone</code> during a day segment.</td>
<td>Shannons entropy measurement based on daily calories burned within <code>heartrate_zone</code> during a time segment.</td>
</tr>
</tbody>
</table>

View File

@ -1181,7 +1181,7 @@
</details>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments</p>
<p class="admonition-title">Available time segments</p>
<ul>
<li>Only available for segments that span 1 or more complete days (e.g. Jan 1<sup>st</sup> 00:00 to Jan 3<sup>rd</sup> 23:59)</li>
</ul>
@ -1231,62 +1231,62 @@
<tr>
<td>countepisodeTYPE</td>
<td>episodes</td>
<td>Number of sleep episodes for a certain sleep type during a day segment.</td>
<td>Number of sleep episodes for a certain sleep type during a time segment.</td>
</tr>
<tr>
<td>avgefficiencyTYPE</td>
<td>scores</td>
<td>Average sleep efficiency for a certain sleep type during a day segment.</td>
<td>Average sleep efficiency for a certain sleep type during a time segment.</td>
</tr>
<tr>
<td>sumdurationafterwakeupTYPE</td>
<td>minutes</td>
<td>Total duration the user stayed in bed after waking up for a certain sleep type during a day segment.</td>
<td>Total duration the user stayed in bed after waking up for a certain sleep type during a time segment.</td>
</tr>
<tr>
<td>sumdurationasleepTYPE</td>
<td>minutes</td>
<td>Total sleep duration for a certain sleep type during a day segment.</td>
<td>Total sleep duration for a certain sleep type during a time segment.</td>
</tr>
<tr>
<td>sumdurationawakeTYPE</td>
<td>minutes</td>
<td>Total duration the user stayed awake but still in bed for a certain sleep type during a day segment.</td>
<td>Total duration the user stayed awake but still in bed for a certain sleep type during a time segment.</td>
</tr>
<tr>
<td>sumdurationtofallasleepTYPE</td>
<td>minutes</td>
<td>Total duration the user spent to fall asleep for a certain sleep type during a day segment.</td>
<td>Total duration the user spent to fall asleep for a certain sleep type during a time segment.</td>
</tr>
<tr>
<td>sumdurationinbedTYPE</td>
<td>minutes</td>
<td>Total duration the user stayed in bed (sumdurationtofallasleep + sumdurationawake + sumdurationasleep + sumdurationafterwakeup) for a certain sleep type during a day segment.</td>
<td>Total duration the user stayed in bed (sumdurationtofallasleep + sumdurationawake + sumdurationasleep + sumdurationafterwakeup) for a certain sleep type during a time segment.</td>
</tr>
<tr>
<td>avgdurationafterwakeupTYPE</td>
<td>minutes</td>
<td>Average duration the user stayed in bed after waking up for a certain sleep type during a day segment.</td>
<td>Average duration the user stayed in bed after waking up for a certain sleep type during a time segment.</td>
</tr>
<tr>
<td>avgdurationasleepTYPE</td>
<td>minutes</td>
<td>Average sleep duration for a certain sleep type during a day segment.</td>
<td>Average sleep duration for a certain sleep type during a time segment.</td>
</tr>
<tr>
<td>avgdurationawakeTYPE</td>
<td>minutes</td>
<td>Average duration the user stayed awake but still in bed for a certain sleep type during a day segment.</td>
<td>Average duration the user stayed awake but still in bed for a certain sleep type during a time segment.</td>
</tr>
<tr>
<td>avgdurationtofallasleepTYPE</td>
<td>minutes</td>
<td>Average duration the user spent to fall asleep for a certain sleep type during a day segment.</td>
<td>Average duration the user spent to fall asleep for a certain sleep type during a time segment.</td>
</tr>
<tr>
<td>avgdurationinbedTYPE</td>
<td>minutes</td>
<td>Average duration the user stayed in bed (sumdurationtofallasleep + sumdurationawake + sumdurationasleep + sumdurationafterwakeup) for a certain sleep type during a day segment.</td>
<td>Average duration the user stayed in bed (sumdurationtofallasleep + sumdurationawake + sumdurationasleep + sumdurationafterwakeup) for a certain sleep type during a time segment.</td>
</tr>
</tbody>
</table>

View File

@ -1012,9 +1012,9 @@
</details>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments</p>
<p class="admonition-title">Available time segments</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
</ul>
</div>
<div class="admonition info">
@ -1049,7 +1049,7 @@
</tr>
<tr>
<td><code>[INCLUDE_ZERO_STEP_ROWS]</code></td>
<td>Whether or not to include day segments with a 0 step count during the whole day.</td>
<td>Whether or not to include time segments with a 0 step count during the whole day.</td>
</tr>
</tbody>
</table>
@ -1066,87 +1066,87 @@
<tr>
<td>sumsteps</td>
<td>steps</td>
<td>The total step count during a day segment.</td>
<td>The total step count during a time segment.</td>
</tr>
<tr>
<td>maxsteps</td>
<td>steps</td>
<td>The maximum step count during a day segment.</td>
<td>The maximum step count during a time segment.</td>
</tr>
<tr>
<td>minsteps</td>
<td>steps</td>
<td>The minimum step count during a day segment.</td>
<td>The minimum step count during a time segment.</td>
</tr>
<tr>
<td>avgsteps</td>
<td>steps</td>
<td>The average step count during a day segment.</td>
<td>The average step count during a time segment.</td>
</tr>
<tr>
<td>stdsteps</td>
<td>steps</td>
<td>The standard deviation of step count during a day segment.</td>
<td>The standard deviation of step count during a time segment.</td>
</tr>
<tr>
<td>countepisodesedentarybout</td>
<td>bouts</td>
<td>Number of sedentary bouts during a day segment.</td>
<td>Number of sedentary bouts during a time segment.</td>
</tr>
<tr>
<td>sumdurationsedentarybout</td>
<td>minutes</td>
<td>Total duration of all sedentary bouts during a day segment.</td>
<td>Total duration of all sedentary bouts during a time segment.</td>
</tr>
<tr>
<td>maxdurationsedentarybout</td>
<td>minutes</td>
<td>The maximum duration of any sedentary bout during a day segment.</td>
<td>The maximum duration of any sedentary bout during a time segment.</td>
</tr>
<tr>
<td>mindurationsedentarybout</td>
<td>minutes</td>
<td>The minimum duration of any sedentary bout during a day segment.</td>
<td>The minimum duration of any sedentary bout during a time segment.</td>
</tr>
<tr>
<td>avgdurationsedentarybout</td>
<td>minutes</td>
<td>The average duration of sedentary bouts during a day segment.</td>
<td>The average duration of sedentary bouts during a time segment.</td>
</tr>
<tr>
<td>stddurationsedentarybout</td>
<td>minutes</td>
<td>The standard deviation of the duration of sedentary bouts during a day segment.</td>
<td>The standard deviation of the duration of sedentary bouts during a time segment.</td>
</tr>
<tr>
<td>countepisodeactivebout</td>
<td>bouts</td>
<td>Number of active bouts during a day segment.</td>
<td>Number of active bouts during a time segment.</td>
</tr>
<tr>
<td>sumdurationactivebout</td>
<td>minutes</td>
<td>Total duration of all active bouts during a day segment.</td>
<td>Total duration of all active bouts during a time segment.</td>
</tr>
<tr>
<td>maxdurationactivebout</td>
<td>minutes</td>
<td>The maximum duration of any active bout during a day segment.</td>
<td>The maximum duration of any active bout during a time segment.</td>
</tr>
<tr>
<td>mindurationactivebout</td>
<td>minutes</td>
<td>The minimum duration of any active bout during a day segment.</td>
<td>The minimum duration of any active bout during a time segment.</td>
</tr>
<tr>
<td>avgdurationactivebout</td>
<td>minutes</td>
<td>The average duration of active bouts during a day segment.</td>
<td>The average duration of active bouts during a time segment.</td>
</tr>
<tr>
<td>stddurationactivebout</td>
<td>minutes</td>
<td>The standard deviation of the duration of active bouts during a day segment.</td>
<td>The standard deviation of the duration of active bouts during a time segment.</td>
</tr>
</tbody>
</table>

View File

@ -1012,7 +1012,7 @@
</details>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments</p>
<p class="admonition-title">Available time segments</p>
<ul>
<li>Only available for segments that span 1 or more complete days (e.g. Jan 1<sup>st</sup> 00:00 to Jan 3<sup>rd</sup> 23:59)</li>
</ul>
@ -1058,27 +1058,27 @@
<tr>
<td>maxsumsteps</td>
<td>steps</td>
<td>The maximum daily step count during a day segment.</td>
<td>The maximum daily step count during a time segment.</td>
</tr>
<tr>
<td>minsumsteps</td>
<td>steps</td>
<td>The minimum daily step count during a day segment.</td>
<td>The minimum daily step count during a time segment.</td>
</tr>
<tr>
<td>avgsumsteps</td>
<td>steps</td>
<td>The average daily step count during a day segment.</td>
<td>The average daily step count during a time segment.</td>
</tr>
<tr>
<td>mediansumsteps</td>
<td>steps</td>
<td>The median of daily step count during a day segment.</td>
<td>The median of daily step count during a time segment.</td>
</tr>
<tr>
<td>stdsumsteps</td>
<td>steps</td>
<td>The standard deviation of daily step count during a day segment.</td>
<td>The standard deviation of daily step count during a time segment.</td>
</tr>
</tbody>
</table>

View File

@ -970,9 +970,9 @@
</table>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android and iOS</li>
</ul>
</div>
@ -1049,9 +1049,9 @@
<h2 id="panda-provider">PANDA provider<a class="headerlink" href="#panda-provider" title="Permanent link">&para;</a></h2>
<p>These features are based on the work by <a href="../../citation#panda-accelerometer">Panda et al</a>.</p>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android and iOS</li>
</ul>
</div>

View File

@ -964,9 +964,9 @@
</table>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android and iOS</li>
</ul>
</div>

View File

@ -973,9 +973,9 @@
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<p>The app category (genre) catalogue used in these features was originally created by <a href="../../citation#stachl-applications-foreground">Stachl et al</a>.</p>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android only</li>
</ul>
</div>
@ -1045,17 +1045,17 @@
<tr>
<td>timeoffirstuse</td>
<td>minutes</td>
<td>The time in minutes between 12:00am (midnight) and the first use of a single app or apps within a category during a <code>day_segment</code></td>
<td>The time in minutes between 12:00am (midnight) and the first use of a single app or apps within a category during a <code>time_segment</code></td>
</tr>
<tr>
<td>timeoflastuse</td>
<td>minutes</td>
<td>The time in minutes between 12:00am (midnight) and the last use of a single app or apps within a category during a <code>day_segment</code></td>
<td>The time in minutes between 12:00am (midnight) and the last use of a single app or apps within a category during a <code>time_segment</code></td>
</tr>
<tr>
<td>frequencyentropy</td>
<td>nats</td>
<td>The entropy of the used apps within a category during a <code>day_segment</code> (each app is seen as a unique event, the more apps were used, the higher the entropy). This is especially relevant when computed over all apps. Entropy cannot be obtained for a single app</td>
<td>The entropy of the used apps within a category during a <code>time_segment</code> (each app is seen as a unique event, the more apps were used, the higher the entropy). This is especially relevant when computed over all apps. Entropy cannot be obtained for a single app</td>
</tr>
</tbody>
</table>

View File

@ -960,9 +960,9 @@
</table>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android and iOS</li>
</ul>
</div>

View File

@ -956,9 +956,9 @@
</table>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android only</li>
</ul>
</div>
@ -1002,17 +1002,17 @@
<tr>
<td>countscans</td>
<td>devices</td>
<td>Number of scanned devices during a <code>day_segment</code>, a device can be detected multiple times over time and these appearances are counted separately</td>
<td>Number of scanned devices during a <code>time_segment</code>, a device can be detected multiple times over time and these appearances are counted separately</td>
</tr>
<tr>
<td>uniquedevices</td>
<td>devices</td>
<td>Number of unique devices during a <code>day_segment</code> as identified by their hardware (<code>bt_address</code>) address</td>
<td>Number of unique devices during a <code>time_segment</code> as identified by their hardware (<code>bt_address</code>) address</td>
</tr>
<tr>
<td>countscansmostuniquedevice</td>
<td>scans</td>
<td>Number of scans of the most scanned device during a <code>day_segment</code> across the whole monitoring period</td>
<td>Number of scans of the most scanned device during a <code>time_segment</code> across the whole monitoring period</td>
</tr>
</tbody>
</table>

View File

@ -956,9 +956,9 @@
</table>
<h2 id="rapids-provider">RAPIDS Provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android and iOS</li>
</ul>
</div>
@ -1007,47 +1007,47 @@
<tr>
<td>count</td>
<td>calls</td>
<td>Number of calls of a particular <code>call_type</code> occurred during a particular <code>day_segment</code>.</td>
<td>Number of calls of a particular <code>call_type</code> occurred during a particular <code>time_segment</code>.</td>
</tr>
<tr>
<td>distinctcontacts</td>
<td>contacts</td>
<td>Number of distinct contacts that are associated with a particular <code>call_type</code> for a particular <code>day_segment</code></td>
<td>Number of distinct contacts that are associated with a particular <code>call_type</code> for a particular <code>time_segment</code></td>
</tr>
<tr>
<td>meanduration</td>
<td>seconds</td>
<td>The mean duration of all calls of a particular <code>call_type</code> during a particular <code>day_segment</code>.</td>
<td>The mean duration of all calls of a particular <code>call_type</code> during a particular <code>time_segment</code>.</td>
</tr>
<tr>
<td>sumduration</td>
<td>seconds</td>
<td>The sum of the duration of all calls of a particular <code>call_type</code> during a particular <code>day_segment</code>.</td>
<td>The sum of the duration of all calls of a particular <code>call_type</code> during a particular <code>time_segment</code>.</td>
</tr>
<tr>
<td>minduration</td>
<td>seconds</td>
<td>The duration of the shortest call of a particular <code>call_type</code> during a particular <code>day_segment</code>.</td>
<td>The duration of the shortest call of a particular <code>call_type</code> during a particular <code>time_segment</code>.</td>
</tr>
<tr>
<td>maxduration</td>
<td>seconds</td>
<td>The duration of the longest call of a particular <code>call_type</code> during a particular <code>day_segment</code>.</td>
<td>The duration of the longest call of a particular <code>call_type</code> during a particular <code>time_segment</code>.</td>
</tr>
<tr>
<td>stdduration</td>
<td>seconds</td>
<td>The standard deviation of the duration of all the calls of a particular <code>call_type</code> during a particular <code>day_segment</code>.</td>
<td>The standard deviation of the duration of all the calls of a particular <code>call_type</code> during a particular <code>time_segment</code>.</td>
</tr>
<tr>
<td>modeduration</td>
<td>seconds</td>
<td>The mode of the duration of all the calls of a particular <code>call_type</code> during a particular <code>day_segment</code>.</td>
<td>The mode of the duration of all the calls of a particular <code>call_type</code> during a particular <code>time_segment</code>.</td>
</tr>
<tr>
<td>entropyduration</td>
<td>nats</td>
<td>The estimate of the Shannon entropy for the the duration of all the calls of a particular <code>call_type</code> during a particular <code>day_segment</code>.</td>
<td>The estimate of the Shannon entropy for the the duration of all the calls of a particular <code>call_type</code> during a particular <code>time_segment</code>.</td>
</tr>
<tr>
<td>timefirstcall</td>
@ -1062,7 +1062,7 @@
<tr>
<td>countmostfrequentcontact</td>
<td>calls</td>
<td>The number of calls of a particular <code>call_type</code> during a particular <code>day_segment</code> of the most frequent contact throughout the monitored period.</td>
<td>The number of calls of a particular <code>call_type</code> during a particular <code>time_segment</code> of the most frequent contact throughout the monitored period.</td>
</tr>
</tbody>
</table>
@ -1079,12 +1079,12 @@
<tr>
<td>count</td>
<td>calls</td>
<td>Number of <code>missed</code> calls that occurred during a particular <code>day_segment</code>.</td>
<td>Number of <code>missed</code> calls that occurred during a particular <code>time_segment</code>.</td>
</tr>
<tr>
<td>distinctcontacts</td>
<td>contacts</td>
<td>Number of distinct contacts that are associated with <code>missed</code> calls for a particular <code>day_segment</code></td>
<td>Number of distinct contacts that are associated with <code>missed</code> calls for a particular <code>time_segment</code></td>
</tr>
<tr>
<td>timefirstcall</td>
@ -1099,7 +1099,7 @@
<tr>
<td>countmostfrequentcontact</td>
<td>calls</td>
<td>The number of <code>missed</code> calls during a particular <code>day_segment</code> of the most frequent contact throughout the monitored period.</td>
<td>The number of <code>missed</code> calls during a particular <code>time_segment</code> of the most frequent contact throughout the monitored period.</td>
</tr>
</tbody>
</table>

View File

@ -960,9 +960,9 @@
</table>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android only</li>
</ul>
</div>
@ -1060,12 +1060,12 @@
<tr>
<td>timefirstconversation</td>
<td>minutes</td>
<td>Minutes since midnight when the first conversation for a day segment was detected</td>
<td>Minutes since midnight when the first conversation for a time segment was detected</td>
</tr>
<tr>
<td>timelastconversation</td>
<td>minutes</td>
<td>Minutes since midnight when the last conversation for a day segment was detected</td>
<td>Minutes since midnight when the last conversation for a time segment was detected</td>
</tr>
<tr>
<td>noisesumenergy</td>

View File

@ -939,7 +939,7 @@
<h1 id="phone-data-yield">Phone Data Yield<a class="headerlink" href="#phone-data-yield" title="Permanent link">&para;</a></h1>
<p>This is a combinatorial sensor which means that we use the data from multiple sensors to extract data yield features. Data yield features can be used to remove rows (<a href="../../setup/configuration/#day-segments">day segments</a>) that do not contain enough data. You should decide what is your &ldquo;enough&rdquo; threshold depending on the type of sensors you collected (frequency vs event based, e.g. acceleroemter vs calls), the length of your study, and the rates of missing data that your analysis could handle.</p>
<p>This is a combinatorial sensor which means that we use the data from multiple sensors to extract data yield features. Data yield features can be used to remove rows (<a href="../../setup/configuration/#time-segments">time segments</a>) that do not contain enough data. You should decide what is your &ldquo;enough&rdquo; threshold depending on the type of sensors you collected (frequency vs event based, e.g. acceleroemter vs calls), the length of your study, and the rates of missing data that your analysis could handle.</p>
<div class="admonition hint">
<p class="admonition-title">Why is data yield important?</p>
<p>Imagine that you want to extract <code>PHONE_CALL</code> features on daily segments (<code>00:00</code> to <code>23:59</code>). Let&rsquo;s say that on day 1 the phone logged 10 calls and 23 hours of data from other sensors and on day 2 the phone logged 10 calls and only 2 hours of data from other sensors. It&rsquo;s more likely that other calls were placed on the 22 hours of data that you didn&rsquo;t log on day 2 than on the 1 hour of data you didn&rsquo;t log on day 1, and so including day 2 in your analysis could bias your results.</p>
@ -982,11 +982,11 @@
<li>A valid minute is any 60 second window when any phone sensor logged at least 1 row of data</li>
<li>A valid hour is any 60 minute window with at least X valid minutes. The X or threshold is given by <code>[MINUTE_RATIO_THRESHOLD_FOR_VALID_YIELDED_HOURS]</code></li>
</ul>
<p>The timestamps of all sensors are concatenated and then grouped per day segment. Minute and hour windows are created from the beginning of each day segment instance and these windows are marked as valid based on the definitions above. The duration of each day segment is taken into account to compute the features described below.</p>
<p>The timestamps of all sensors are concatenated and then grouped per time segment. Minute and hour windows are created from the beginning of each time segment instance and these windows are marked as valid based on the definitions above. The duration of each time segment is taken into account to compute the features described below.</p>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android and iOS</li>
</ul>
</div>
@ -1035,12 +1035,12 @@
<tr>
<td>ratiovalidyieldedminutes</td>
<td>rows</td>
<td>The ratio between the number of valid minutes and the duration in minutes of a day segment.</td>
<td>The ratio between the number of valid minutes and the duration in minutes of a time segment.</td>
</tr>
<tr>
<td>ratiovalidyieldedhours</td>
<td>lux</td>
<td>The ratio between the number of valid hours and the duration in hours of a day segment. If the day segment is shorter than 1 hour this feature will always be 1.</td>
<td>The ratio between the number of valid hours and the duration in hours of a time segment. If the time segment is shorter than 1 hour this feature will always be 1.</td>
</tr>
</tbody>
</table>
@ -1048,8 +1048,8 @@
<p class="admonition-title">Assumptions/Observations</p>
<ol>
<li>
<p>We recommend using <code>ratiovalidyieldedminutes</code> on day segments that are shorter than two or three hours and <code>ratiovalidyieldedhours</code> for longer segments. This is because relying on yielded minutes only can be misleading when a big chunk of those missing minutes are clustered together. </p>
<p>For example, let&rsquo;s assume we are working with a 24-hour day segment that is missing 12 hours of data. Two extreme cases can occur: </p>
<p>We recommend using <code>ratiovalidyieldedminutes</code> on time segments that are shorter than two or three hours and <code>ratiovalidyieldedhours</code> for longer segments. This is because relying on yielded minutes only can be misleading when a big chunk of those missing minutes are clustered together. </p>
<p>For example, let&rsquo;s assume we are working with a 24-hour time segment that is missing 12 hours of data. Two extreme cases can occur: </p>
<p><ol type="A">
<li>the 12 missing hours are from the beginning of the segment or </li>
<li>30 minutes could be missing from every hour (24 * 30 minutes = 12 hours).</li>

View File

@ -956,9 +956,9 @@
</table>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android only</li>
</ul>
</div>

View File

@ -983,13 +983,13 @@
<div class="admonition note">
<p class="admonition-title">Assumptions/Observations</p>
<p><strong>Types of location data to use</strong>
AWARE Android and iOS clients can collect location coordinates through the phone's GPS, the network cellular towers around the phone or Google's fused location API. If you want to use only the GPS provider set <code>[LOCATIONS_TO_USE]</code> to <code>GPS</code>, if you want to use all providers (not recommended due to the difference in accuracy) set <code>[LOCATIONS_TO_USE]</code> to <code>ALL</code>, if your AWARE client was configured to use fused location only or want to focus only on this provider, set <code>[LOCATIONS_TO_USE]</code> to <code>RESAMPLE_FUSED</code>. <code>RESAMPLE_FUSED</code> takes the original fused location coordinates and replicates each pair forward in time as long as the phone was sensing data as indicated by <a href="../phone-data-quality/#phone-valid-sensed-bins"><code>PHONE_VALID_SENSED_BINS</code></a>, this is done because Google's API only logs a new location coordinate pair when it is sufficiently different in time or space from the previous one.</p>
AWARE Android and iOS clients can collect location coordinates through the phone's GPS, the network cellular towers around the phone or Google's fused location API. If you want to use only the GPS provider set <code>[LOCATIONS_TO_USE]</code> to <code>GPS</code>, if you want to use all providers (not recommended due to the difference in accuracy) set <code>[LOCATIONS_TO_USE]</code> to <code>ALL</code>, if your AWARE client was configured to use fused location only or want to focus only on this provider, set <code>[LOCATIONS_TO_USE]</code> to <code>RESAMPLE_FUSED</code>. <code>RESAMPLE_FUSED</code> takes the original fused location coordinates and replicates each pair forward in time as long as the phone was sensing data as indicated by the joined timestamps of <a href="../phone-data-yield/"><code>[PHONE_DATA_YIELD][SENSORS]</code></a>, this is done because Google's API only logs a new location coordinate pair when it is sufficiently different in time or space from the previous one.</p>
<p>There are two parameters associated with resampling fused location. <code>FUSED_RESAMPLED_CONSECUTIVE_THRESHOLD</code> (in minutes, default 30) controls the maximum gap between any two coordinate pairs to replicate the last known pair (for example, participant A's phone did not collect data between 10.30am and 10:50am and between 11:05am and 11:40am, the last known coordinate pair will be replicated during the first period but not the second, in other words, we assume that we cannot longer guarantee the participant stayed at the last known location if the phone did not sense data for more than 30 minutes). <code>FUSED_RESAMPLED_TIME_SINCE_VALID_LOCATION</code> (in minutes, default 720 or 12 hours) stops the last known fused location from being replicated longer that this threshold even if the phone was sensing data continuously (for example, participant A went home at 9pm and their phone was sensing data without gaps until 11am the next morning, the last known location will only be replicated until 9am). If you have suggestions to modify or improve this resampling, let us know.</p>
</div>
<h2 id="barnett-provider">BARNETT provider<a class="headerlink" href="#barnett-provider" title="Permanent link">&para;</a></h2>
<p>These features are based on the original open-source implementation by <a href="../../citation#barnett-locations">Barnett et al</a> and some features created by <a href="../../citation#barnett-locations">Canzian et al</a>.</p>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available only for segments that start at 00:00:00 and end at 23:59:59 of the same day (daily segments)</li>
<li>Available for Android and iOS</li>
@ -1031,7 +1031,7 @@ AWARE Android and iOS clients can collect location coordinates through the phone
</tr>
<tr>
<td><code>[MINUTES_DATA_USED]</code></td>
<td>Set to <code>True</code> to include an extra column in the final location feature file containing the number of minutes used to compute the features on each day segment. Use this for quality control purposes, the more data minutes exist for a period, the more reliable its features should be. For fused location, a single minute can contain more than one coordinate pair if the participant is moving fast enough.</td>
<td>Set to <code>True</code> to include an extra column in the final location feature file containing the number of minutes used to compute the features on each time segment. Use this for quality control purposes, the more data minutes exist for a period, the more reliable its features should be. For fused location, a single minute can contain more than one coordinate pair if the participant is moving fast enough.</td>
</tr>
</tbody>
</table>
@ -1129,9 +1129,9 @@ For a detailed description of how this is calculated, see <a href="../../citatio
<h2 id="doryab-provider">DORYAB provider<a class="headerlink" href="#doryab-provider" title="Permanent link">&para;</a></h2>
<p>These features are based on the original implementation by <a href="../../citation#doryab-locations">Doryab et al.</a>.</p>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android and iOS</li>
</ul>
</div>
@ -1179,7 +1179,7 @@ For a detailed description of how this is calculated, see <a href="../../citatio
</tr>
<tr>
<td><code>[MINUTES_DATA_USED]</code></td>
<td>Set to <code>True</code> to include an extra column in the final location feature file containing the number of minutes used to compute the features on each day segment. Use this for quality control purposes, the more data minutes exist for a period, the more reliable its features should be. For fused location, a single minute can contain more than one coordinate pair if the participant is moving fast enough.</td>
<td>Set to <code>True</code> to include an extra column in the final location feature file containing the number of minutes used to compute the features on each time segment. Use this for quality control purposes, the more data minutes exist for a period, the more reliable its features should be. For fused location, a single minute can contain more than one coordinate pair if the participant is moving fast enough.</td>
</tr>
<tr>
<td><code>[SAMPLING_FREQUENCY]</code></td>
@ -1210,17 +1210,17 @@ For a detailed description of how this is calculated, see <a href="../../citatio
<tr>
<td>totaldistance</td>
<td>meters</td>
<td>Total distance travelled in a day segment using the haversine formula.</td>
<td>Total distance travelled in a time segment using the haversine formula.</td>
</tr>
<tr>
<td>averagespeed</td>
<td>km/hr</td>
<td>Average speed in a day segment considering only the instances labeled as Moving.</td>
<td>Average speed in a time segment considering only the instances labeled as Moving.</td>
</tr>
<tr>
<td>varspeed</td>
<td>km/hr</td>
<td>Speed variance in a day segment considering only the instances labeled as Moving.</td>
<td>Speed variance in a time segment considering only the instances labeled as Moving.</td>
</tr>
<tr>
<td>circadianmovement</td>
@ -1235,7 +1235,7 @@ For a detailed description of how this is calculated, see <a href="../../citatio
<tr>
<td>numberlocationtransitions</td>
<td>transitions</td>
<td>Number of movements between any two clusters in a day segment.</td>
<td>Number of movements between any two clusters in a time segment.</td>
</tr>
<tr>
<td>radiusgyration</td>
@ -1265,7 +1265,7 @@ For a detailed description of how this is calculated, see <a href="../../citatio
<tr>
<td>outlierstimepercent</td>
<td>-</td>
<td>Ratio between the number of rows that belong to non-significant clusters divided by the total number of rows in a day segment.</td>
<td>Ratio between the number of rows that belong to non-significant clusters divided by the total number of rows in a time segment.</td>
</tr>
<tr>
<td>maxlengthstayatclusters</td>

View File

@ -956,9 +956,9 @@
</table>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android only</li>
</ul>
</div>
@ -1006,27 +1006,27 @@
<tr>
<td>count</td>
<td>messages</td>
<td>Number of messages of type <code>messages_type</code> that occurred during a particular <code>day_segment</code>.</td>
<td>Number of messages of type <code>messages_type</code> that occurred during a particular <code>time_segment</code>.</td>
</tr>
<tr>
<td>distinctcontacts</td>
<td>contacts</td>
<td>Number of distinct contacts that are associated with a particular <code>messages_type</code> during a particular <code>day_segment</code>.</td>
<td>Number of distinct contacts that are associated with a particular <code>messages_type</code> during a particular <code>time_segment</code>.</td>
</tr>
<tr>
<td>timefirstmessages</td>
<td>minutes</td>
<td>Number of minutes between 12:00am (midnight) and the first <code>message</code> of a particular <code>messages_type</code> during a particular <code>day_segment</code>.</td>
<td>Number of minutes between 12:00am (midnight) and the first <code>message</code> of a particular <code>messages_type</code> during a particular <code>time_segment</code>.</td>
</tr>
<tr>
<td>timelastmessages</td>
<td>minutes</td>
<td>Number of minutes between 12:00am (midnight) and the last <code>message</code> of a particular <code>messages_type</code> during a particular <code>day_segment</code>.</td>
<td>Number of minutes between 12:00am (midnight) and the last <code>message</code> of a particular <code>messages_type</code> during a particular <code>time_segment</code>.</td>
</tr>
<tr>
<td>countmostfrequentcontact</td>
<td>messages</td>
<td>Number of messages from the contact with the most messages of <code>messages_type</code> during a <code>day_segment</code> throughout the whole dataset of each participant.</td>
<td>Number of messages from the contact with the most messages of <code>messages_type</code> during a <code>time_segment</code> throughout the whole dataset of each participant.</td>
</tr>
</tbody>
</table>

View File

@ -956,9 +956,9 @@
</table>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android and iOS</li>
</ul>
</div>

View File

@ -956,9 +956,9 @@
</table>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android and iOS</li>
</ul>
</div>
@ -1002,17 +1002,17 @@
<tr>
<td>countscans</td>
<td>devices</td>
<td>Number of scanned WiFi access points connected during a day_segment, an access point can be detected multiple times over time and these appearances are counted separately</td>
<td>Number of scanned WiFi access points connected during a time_segment, an access point can be detected multiple times over time and these appearances are counted separately</td>
</tr>
<tr>
<td>uniquedevices</td>
<td>devices</td>
<td>Number of unique access point during a day_segment as identified by their hardware address</td>
<td>Number of unique access point during a time_segment as identified by their hardware address</td>
</tr>
<tr>
<td>countscansmostuniquedevice</td>
<td>scans</td>
<td>Number of scans of the most scanned access point during a day_segment across the whole monitoring period</td>
<td>Number of scans of the most scanned access point during a time_segment across the whole monitoring period</td>
</tr>
</tbody>
</table>

View File

@ -956,9 +956,9 @@
</table>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android only</li>
</ul>
</div>
@ -1002,17 +1002,17 @@
<tr>
<td>countscans</td>
<td>devices</td>
<td>Number of scanned WiFi access points visible during a day_segment, an access point can be detected multiple times over time and these appearances are counted separately</td>
<td>Number of scanned WiFi access points visible during a time_segment, an access point can be detected multiple times over time and these appearances are counted separately</td>
</tr>
<tr>
<td>uniquedevices</td>
<td>devices</td>
<td>Number of unique access point during a day_segment as identified by their hardware address</td>
<td>Number of unique access point during a time_segment as identified by their hardware address</td>
</tr>
<tr>
<td>countscansmostuniquedevice</td>
<td>scans</td>
<td>Number of scans of the most scanned access point during a day_segment across the whole monitoring period</td>
<td>Number of scans of the most scanned access point during a time_segment across the whole monitoring period</td>
</tr>
</tbody>
</table>

View File

@ -898,10 +898,10 @@
<p>Read this page if you want to learn more about how RAPIDS is structured. If you want to start using it go to <a href="../setup/installation/">Installation</a>, then to <a href="../setup/configuration/">Configuration</a>, and then to <a href="../setup/execution/">Execution</a></p>
</div>
<p>All paths mentioned in this page are relative to RAPIDS&rsquo; root folder.</p>
<p>If you want to extract the behavioral features that RAPIDS offers, you will only have to create or modify the <a href="../setup/configuration/#database-credentials"><code>.env</code> file</a>, <a href="../setup/configuration/#participant-files">participants files</a>, <a href="../setup/configuration/#day-segments">day segment files</a>, and the <code>config.yaml</code> file. The <code>config.yaml</code> file is the heart of RAPIDS and includes parameters to manage participants, data sources, sensor data, visualizations and more.</p>
<p>If you want to extract the behavioral features that RAPIDS offers, you will only have to create or modify the <a href="../setup/configuration/#database-credentials"><code>.env</code> file</a>, <a href="../setup/configuration/#participant-files">participants files</a>, <a href="../setup/configuration/#time-segments">time segment files</a>, and the <code>config.yaml</code> file. The <code>config.yaml</code> file is the heart of RAPIDS and includes parameters to manage participants, data sources, sensor data, visualizations and more.</p>
<p>All data is saved in <code>data/</code>. The <code>data/external/</code> folder stores any data imported or created by the user, <code>data/raw/</code> stores sensor data as imported from your database, <code>data/interim/</code> has intermediate files necessary to compute behavioral features from raw data, and <code>data/processed/</code> has all the final files with the behavioral features in folders per participant and sensor.</p>
<p>All the source code is saved in <code>src/</code>. The <code>src/data/</code> folder stores scripts to download, clean and pre-process sensor data, <code>src/features</code> has scripts to extract behavioral features organized in their respective subfolders , <code>src/models/</code> can host any script to create models or statistical analyses with the behavioral features you extract, and <code>src/visualization/</code> has scripts to create plots of the raw and processed data.</p>
<p>There are other important files and folders but only relevant if you are interested in extending RAPIDS (e.g. virtual env files, docs, tests, Dockerfile, the Snakefile, etc.). In the figure below, we represent the interactions between users and files. After a user modifies <code>config.yaml</code> and <code>.env</code> the <code>Snakefile</code> file will decide what Snakemake rules have to be executed to produce the required output files (behavioral features) and what scripts are in charge of producing such files. In addition, users can add or modifiy files in the <code>data</code> folder (for example to configure the <a href="../setup/configuration/#participant-files">participants files</a> or the <a href="../setup/configuration/#day-segments">day segment files</a>).</p>
<p>There are other important files and folders but only relevant if you are interested in extending RAPIDS (e.g. virtual env files, docs, tests, Dockerfile, the Snakefile, etc.). In the figure below, we represent the interactions between users and files. After a user modifies <code>config.yaml</code> and <code>.env</code> the <code>Snakefile</code> file will decide what Snakemake rules have to be executed to produce the required output files (behavioral features) and what scripts are in charge of producing such files. In addition, users can add or modifiy files in the <code>data</code> folder (for example to configure the <a href="../setup/configuration/#participant-files">participants files</a> or the <a href="../setup/configuration/#time-segments">time segment files</a>).</p>
<figure>
<img src="../img/files.png" width="600" />
<figcaption>Interaction diagram between the user, and important files in RAPIDS</figcaption>

View File

@ -965,7 +965,7 @@
<h1 id="welcome-to-rapids-documentation">Welcome to RAPIDS documentation<a class="headerlink" href="#welcome-to-rapids-documentation" title="Permanent link">&para;</a></h1>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>The functionality outlined in these docs is implemented in the branch <code>day_segments</code> which we will merge to <code>master</code> soon as release <code>0.1</code>. The previous (first) release of RAPIDS along with the old <a href="https://rapidspitt.readthedocs.io/en/latest/">docs</a> will be labeled <code>beta</code>. If you landed on this page feel free to look around, just have in mind that we are polishing the last rough patches before we advertise <code>0.1</code> (Nov 16, 2020)</p>
<p>The functionality outlined in these docs is implemented in the branch <code>time_segments</code> which we will merge to <code>master</code> soon as release <code>0.1</code>. The previous (first) release of RAPIDS along with the old <a href="https://rapidspitt.readthedocs.io/en/latest/">docs</a> will be labeled <code>beta</code>. If you landed on this page feel free to look around, just have in mind that we are polishing the last rough patches before we advertise <code>0.1</code> (Nov 16, 2020)</p>
</div>
<p>Reproducible Analysis Pipeline for Data Streams (RAPIDS) allows you to process smartphone and wearable data to extract <strong>behavioral features</strong> (a.k.a. digital biomarkers/phenotypes).</p>
<p>RAPIDS is open source, documented, modular, tested, and reproducible. At the moment we support smartphone data collected with <a href="https://awareframework.com/">AWARE</a> and wearable data from Fitbit devices.</p>
@ -982,13 +982,13 @@
<li><strong>Parallel execution</strong>. Thanks to Snakemake, your analysis can be executed over multiple cores without changing your code.</li>
<li><strong>Extensible code</strong>. You can easily add your own behavioral features in R or Python and keep authorship and citations.</li>
<li><strong>Timezone aware</strong>. Your data is adjusted to the specified timezone (multiple timezones suport <em>coming soon</em>).</li>
<li><strong>Flexible day segments</strong>. You can extract behavioral features on time windows of any length (e.g. 5 minutes, 3 hours, 2 days), on every day or particular days (e.g. weekends, Mondays, the 1<sup>st</sup> of each month, etc.) or around events of interest (e.g. surveys or clinical relapses).</li>
<li><strong>Flexible time segments</strong>. You can extract behavioral features on time windows of any length (e.g. 5 minutes, 3 hours, 2 days), on every day or particular days (e.g. weekends, Mondays, the 1<sup>st</sup> of each month, etc.) or around events of interest (e.g. surveys or clinical relapses).</li>
<li><strong>Tested code</strong>. We are constantly adding tests to make sure our behavioral features are correct.</li>
<li><strong>Reproducible code</strong>. You can be sure your code will run in other computers as intended thanks to R and Python virtual environments. You can share your analysis code along your publications without any overhead.</li>
<li><strong>Private</strong>. All your data is processed locally.</li>
</ol>
<h2 id="how-is-it-organized">How is it organized?<a class="headerlink" href="#how-is-it-organized" title="Permanent link">&para;</a></h2>
<p>In broad terms the <code>config.yaml</code>, <a href="../setup/configuration/#database-credentials"><code>.env</code> file</a>, <a href="../setup/configuration/#participant-files">participants files</a>, <a href="../setup/configuration/#day-segments">day segment files</a> are the only ones that you will have to modify. All data is stored in <code>data/</code> and all scripts are stored in <code>src/</code>. For more information see RAPIDS&rsquo; <a href="file-structure/">File Structure</a>.</p>
<p>In broad terms the <code>config.yaml</code>, <a href="../setup/configuration/#database-credentials"><code>.env</code> file</a>, <a href="../setup/configuration/#participant-files">participants files</a>, <a href="../setup/configuration/#time-segments">time segment files</a> are the only ones that you will have to modify. All data is stored in <code>data/</code> and all scripts are stored in <code>src/</code>. For more information see RAPIDS&rsquo; <a href="file-structure/">File Structure</a>.</p>

File diff suppressed because one or more lines are too long

View File

@ -371,11 +371,11 @@
</li>
<li class="md-nav__item">
<a href="#day-segments" class="md-nav__link">
Day Segments
<a href="#time-segments" class="md-nav__link">
Time Segments
</a>
<nav class="md-nav" aria-label="Day Segments">
<nav class="md-nav" aria-label="Time Segments">
<ul class="md-nav__list">
<li class="md-nav__item">
@ -1062,11 +1062,11 @@
</li>
<li class="md-nav__item">
<a href="#day-segments" class="md-nav__link">
Day Segments
<a href="#time-segments" class="md-nav__link">
Time Segments
</a>
<nav class="md-nav" aria-label="Day Segments">
<nav class="md-nav" aria-label="Time Segments">
<ul class="md-nav__list">
<li class="md-nav__item">
@ -1118,7 +1118,7 @@
<li>Add your <a href="#database-credentials">database credentials</a></li>
<li>Choose the <a href="#timezone-of-your-study">timezone of your study</a></li>
<li>Create your <a href="#participant-files">participants files</a></li>
<li>Select what <a href="#day-segments">day segments</a> you want to extract features on</li>
<li>Select what <a href="#time-segments">time segments</a> you want to extract features on</li>
<li>Modify your <a href="#device-data-source-configuration">device data source configuration</a></li>
<li>Select what <a href="#sensor-and-features-to-process">sensors and features</a> you want to process</li>
</ol>
@ -1344,16 +1344,16 @@ a748ee1a-1d0b-4ae9-9074-279a2b6ba524;dsadas-2324-fgsf-sdwr-gdfgs4rfsdf43,p01,jul
</div>
</div>
<hr />
<h2 id="day-segments">Day Segments<a class="headerlink" href="#day-segments" title="Permanent link">&para;</a></h2>
<p>Day segments (or epochs) are the time windows on which you want to extract behavioral features. For example, you might want to process data on every day, every morning, or only during weekends. RAPIDS offers three categories of day segments that are flexible enough to cover most use cases: <strong>frequency</strong> (short time windows every day), <strong>periodic</strong> (arbitrary time windows on any day), and <strong>event</strong> (arbitrary time windows around events of interest). See also our <a href="#segment-examples">examples</a>.</p>
<h2 id="time-segments">Time Segments<a class="headerlink" href="#time-segments" title="Permanent link">&para;</a></h2>
<p>Time segments (or epochs) are the time windows on which you want to extract behavioral features. For example, you might want to process data on every day, every morning, or only during weekends. RAPIDS offers three categories of time segments that are flexible enough to cover most use cases: <strong>frequency</strong> (short time windows every day), <strong>periodic</strong> (arbitrary time windows on any day), and <strong>event</strong> (arbitrary time windows around events of interest). See also our <a href="#segment-examples">examples</a>.</p>
<div class="tabbed-set" data-tabs="2:3"><input checked="checked" id="__tabbed_2_1" name="__tabbed_2" type="radio" /><label for="__tabbed_2_1">Frequency Segments</label><div class="tabbed-content">
<p>These segments are computed on every day and all have the same duration (for example 30 minutes). Set the following keys in your <code>config.yaml</code></p>
<div class="highlight"><pre><span></span><code><span class="nt">DAY_SEGMENTS</span><span class="p">:</span> <span class="nl">&amp;day_segments</span>
<div class="highlight"><pre><span></span><code><span class="nt">TIME_SEGMENTS</span><span class="p">:</span> <span class="nl">&amp;time_segments</span>
<span class="nt">TYPE</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">FREQUENCY</span>
<span class="nt">FILE</span><span class="p">:</span> <span class="s">&quot;data/external/your_frequency_segments.csv&quot;</span>
<span class="nt">INCLUDE_PAST_PERIODIC_SEGMENTS</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">FALSE</span>
</code></pre></div>
<p>The file pointed by <code>[DAY_SEGMENTS][FILE]</code> should have the following format and can only have 1 row.</p>
<p>The file pointed by <code>[TIME_SEGMENTS][FILE]</code> should have the following format and can only have 1 row.</p>
<table>
<thead>
<tr>
@ -1364,11 +1364,11 @@ a748ee1a-1d0b-4ae9-9074-279a2b6ba524;dsadas-2324-fgsf-sdwr-gdfgs4rfsdf43,p01,jul
<tbody>
<tr>
<td>label</td>
<td>A string that is used as a prefix in the name of your day segments</td>
<td>A string that is used as a prefix in the name of your time segments</td>
</tr>
<tr>
<td>length</td>
<td>An integer representing the duration of your day segments in minutes</td>
<td>An integer representing the duration of your time segments in minutes</td>
</tr>
</tbody>
</table>
@ -1377,7 +1377,7 @@ a748ee1a-1d0b-4ae9-9074-279a2b6ba524;dsadas-2324-fgsf-sdwr-gdfgs4rfsdf43,p01,jul
<div class="highlight"><pre><span></span><code>label,length
thirtyminutes,30
</code></pre></div>
<p>This configuration will compute 48 day segments for every day when any data from any participant was sensed. For example:</p>
<p>This configuration will compute 48 time segments for every day when any data from any participant was sensed. For example:</p>
<div class="highlight"><pre><span></span><code>start_time,length,label
00:00,30,thirtyminutes0000
00:30,30,thirtyminutes0001
@ -1389,13 +1389,13 @@ thirtyminutes,30
</div>
<input id="__tabbed_2_2" name="__tabbed_2" type="radio" /><label for="__tabbed_2_2">Periodic Segments</label><div class="tabbed-content">
<p>These segments can be computed every day, or on specific days of the week, month, quarter, and year. Their minimum duration is 1 minute but they can be as long as you want. Set the following keys in your <code>config.yaml</code>.</p>
<div class="highlight"><pre><span></span><code><span class="nt">DAY_SEGMENTS</span><span class="p">:</span> <span class="nl">&amp;day_segments</span>
<div class="highlight"><pre><span></span><code><span class="nt">TIME_SEGMENTS</span><span class="p">:</span> <span class="nl">&amp;time_segments</span>
<span class="nt">TYPE</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">PERIODIC</span>
<span class="nt">FILE</span><span class="p">:</span> <span class="s">&quot;data/external/your_periodic_segments.csv&quot;</span>
<span class="nt">INCLUDE_PAST_PERIODIC_SEGMENTS</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">FALSE</span> <span class="c1"># or TRUE</span>
</code></pre></div>
<p>If <code>[INCLUDE_PAST_PERIODIC_SEGMENTS]</code> is set to <code>TRUE</code>, RAPIDS will consider instances of your segments back enough in the past as to include the first row of data of each participant. For example, if the first row of data from a participant happened on Saturday March 7<sup>th</sup> 2020 and the requested segment duration is 7 days starting on every Sunday, the first segment to be considered would start on Sunday March 1<sup>st</sup> if <code>[INCLUDE_PAST_PERIODIC_SEGMENTS]</code> is <code>TRUE</code> or on Sunday March 8<sup>th</sup> if <code>FALSE</code>.</p>
<p>The file pointed by <code>[DAY_SEGMENTS][FILE]</code> should have the following format and can have multiple rows.</p>
<p>The file pointed by <code>[TIME_SEGMENTS][FILE]</code> should have the following format and can have multiple rows.</p>
<table>
<thead>
<tr>
@ -1406,7 +1406,7 @@ thirtyminutes,30
<tbody>
<tr>
<td>label</td>
<td>A string that is used as a prefix in the name of your day segments. It has to be <strong>unique</strong> between rows</td>
<td>A string that is used as a prefix in the name of your time segments. It has to be <strong>unique</strong> between rows</td>
</tr>
<tr>
<td>start_time</td>
@ -1440,12 +1440,12 @@ night,00:00:00,5H 59M 59S,every_day,0
</div>
<input id="__tabbed_2_3" name="__tabbed_2" type="radio" /><label for="__tabbed_2_3">Event segments</label><div class="tabbed-content">
<p>These segments can be computed before or after an event of interest (defined as any UNIX timestamp). Their minimum duration is 1 minute but they can be as long as you want. The start of each segment can be shifted backwards or forwards from the specified timestamp. Set the following keys in your <code>config.yaml</code>.</p>
<div class="highlight"><pre><span></span><code><span class="nt">DAY_SEGMENTS</span><span class="p">:</span> <span class="nl">&amp;day_segments</span>
<div class="highlight"><pre><span></span><code><span class="nt">TIME_SEGMENTS</span><span class="p">:</span> <span class="nl">&amp;time_segments</span>
<span class="nt">TYPE</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">EVENT</span>
<span class="nt">FILE</span><span class="p">:</span> <span class="s">&quot;data/external/your_event_segments.csv&quot;</span>
<span class="nt">INCLUDE_PAST_PERIODIC_SEGMENTS</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">FALSE</span> <span class="c1"># or TRUE</span>
</code></pre></div>
<p>The file pointed by <code>[DAY_SEGMENTS][FILE]</code> should have the following format and can have multiple rows.</p>
<p>The file pointed by <code>[TIME_SEGMENTS][FILE]</code> should have the following format and can have multiple rows.</p>
<table>
<thead>
<tr>
@ -1456,11 +1456,11 @@ night,00:00:00,5H 59M 59S,every_day,0
<tbody>
<tr>
<td>label</td>
<td>A string that is used as a prefix in the name of your day segments. If labels are unique, every segment is independent; if two or more segments have the same label, their data will be grouped when computing auxiliary data for features like the <code>most frequent contact</code> for calls (the most frequent contact will be computed across all these segments). There cannot be two <em>overlaping</em> event segments with the same label (RAPIDS will throw an error)</td>
<td>A string that is used as a prefix in the name of your time segments. If labels are unique, every segment is independent; if two or more segments have the same label, their data will be grouped when computing auxiliary data for features like the <code>most frequent contact</code> for calls (the most frequent contact will be computed across all these segments). There cannot be two <em>overlaping</em> event segments with the same label (RAPIDS will throw an error)</td>
</tr>
<tr>
<td>event_timestamp</td>
<td>A UNIX timestamp that represents the moment an event of interest happened (clinical relapse, survey, readmission, etc.). The corresponding day segment will be computed around this moment using <code>length</code>, <code>shift</code>, and <code>shift_direction</code></td>
<td>A UNIX timestamp that represents the moment an event of interest happened (clinical relapse, survey, readmission, etc.). The corresponding time segment will be computed around this moment using <code>length</code>, <code>shift</code>, and <code>shift_direction</code></td>
</tr>
<tr>
<td>length</td>
@ -1492,13 +1492,13 @@ mood,1587661220000,1H,0,0,a748ee1a-1d0b-4ae9-9074-279a2b6ba524
mood,1587747620000,1D,0,0,a748ee1a-1d0b-4ae9-9074-279a2b6ba524
mood,1587906020000,7D,0,0,a748ee1a-1d0b-4ae9-9074-279a2b6ba524
</code></pre></div>
<p>This example will create eight segments for a single participant (<code>a748ee1a...</code>), five independent <code>stressX</code> segments with various lengths (1,4,3,7, and 9 hours). Segments <code>stress1</code>, <code>stress3</code>, and <code>stress5</code> are shifted forwards by 5 minutes and <code>stress2</code> and <code>stress4</code> are shifted backwards by 4 hours (that is, if the <code>stress4</code> event happened on March 15<sup>th</sup> at 1pm EST (<code>1584291600000</code>), the day segment will start on that day at 9am and end at 4pm). </p>
<p>This example will create eight segments for a single participant (<code>a748ee1a...</code>), five independent <code>stressX</code> segments with various lengths (1,4,3,7, and 9 hours). Segments <code>stress1</code>, <code>stress3</code>, and <code>stress5</code> are shifted forwards by 5 minutes and <code>stress2</code> and <code>stress4</code> are shifted backwards by 4 hours (that is, if the <code>stress4</code> event happened on March 15<sup>th</sup> at 1pm EST (<code>1584291600000</code>), the time segment will start on that day at 9am and end at 4pm). </p>
<p>The three <code>mood</code> segments are 1 hour, 1 day and 7 days long and have no shift. In addition, these <code>mood</code> segments are grouped together, meaning that although RAPIDS will compute features on each one of them, some necessary information to compute a few of such features will be extracted from all three segments, for example the phone contact that called a participant the most or the location clusters visited by a participant.</p>
</div>
</div>
</div>
<h3 id="segment-examples">Segment Examples<a class="headerlink" href="#segment-examples" title="Permanent link">&para;</a></h3>
<div class="tabbed-set" data-tabs="3:6"><input checked="checked" id="__tabbed_3_1" name="__tabbed_3" type="radio" /><label for="__tabbed_3_1">5-minutes</label><div class="tabbed-content">
<div class="tabbed-set" data-tabs="3:7"><input checked="checked" id="__tabbed_3_1" name="__tabbed_3" type="radio" /><label for="__tabbed_3_1">5-minutes</label><div class="tabbed-content">
<p>Use the following <code>Frequency</code> segment file to create 288 (12 * 60 * 24) 5-minute segments starting from midnight of every day in your study
<div class="highlight"><pre><span></span><code>label,length
fiveminutes,5
@ -1511,12 +1511,18 @@ daily,00:00:00,23H 59M 59S,every_day,0
</code></pre></div></p>
</div>
<input id="__tabbed_3_3" name="__tabbed_3" type="radio" /><label for="__tabbed_3_3">Morning</label><div class="tabbed-content">
<p>Use the following <code>Periodic</code> segment file to create morning segments starting from 06:00 and ending at 12:00 of every day in your study
<p>Use the following <code>Periodic</code> segment file to create morning segments starting at 06:00:00 and ending at 11:59:59 of every day in your study
<div class="highlight"><pre><span></span><code>label,start_time,length,repeats_on,repeats_value
morning,00:00:00,5H 59M 59S,every_day,0
morning,06:00:00,5H 59M 59S,every_day,0
</code></pre></div></p>
</div>
<input id="__tabbed_3_4" name="__tabbed_3" type="radio" /><label for="__tabbed_3_4">Weekly</label><div class="tabbed-content">
<input id="__tabbed_3_4" name="__tabbed_3" type="radio" /><label for="__tabbed_3_4">Overnight</label><div class="tabbed-content">
<p>Use the following <code>Periodic</code> segment file to create overnight segments starting at 20:00:00 and ending at 07:59:59 (next day) of every day in your study
<div class="highlight"><pre><span></span><code>label,start_time,length,repeats_on,repeats_value
morning,20:00:00,11H 59M 59S,every_day,0
</code></pre></div></p>
</div>
<input id="__tabbed_3_5" name="__tabbed_3" type="radio" /><label for="__tabbed_3_5">Weekly</label><div class="tabbed-content">
<p>Use the following <code>Periodic</code> segment file to create <strong>non-overlapping</strong> weekly segments starting at midnight of every <strong>Monday</strong> in your study
<div class="highlight"><pre><span></span><code>label,start_time,length,repeats_on,repeats_value
weekly,00:00:00,6D 23H 59M 59S,wday,1
@ -1526,13 +1532,13 @@ Use the following <code>Periodic</code> segment file to create <strong>overlappi
weekly,00:00:00,6D 23H 59M 59S,every_day,0
</code></pre></div></p>
</div>
<input id="__tabbed_3_5" name="__tabbed_3" type="radio" /><label for="__tabbed_3_5">Week-ends</label><div class="tabbed-content">
<input id="__tabbed_3_6" name="__tabbed_3" type="radio" /><label for="__tabbed_3_6">Week-ends</label><div class="tabbed-content">
<p>Use the following <code>Periodic</code> segment file to create week-end segments starting at midnight of every <strong>Saturday</strong> in your study
<div class="highlight"><pre><span></span><code>label,start_time,length,repeats_on,repeats_value
weekend,00:00:00,1D 23H 59M 59S,wday,6
</code></pre></div></p>
</div>
<input id="__tabbed_3_6" name="__tabbed_3" type="radio" /><label for="__tabbed_3_6">Around surveys</label><div class="tabbed-content">
<input id="__tabbed_3_7" name="__tabbed_3" type="radio" /><label for="__tabbed_3_7">Around surveys</label><div class="tabbed-content">
<p>Use the following <code>Event</code> segment file to create two 2-hour segments that start 1 hour before surveys answered by 3 participants
<div class="highlight"><pre><span></span><code>label,event_timestamp,length,shift,shift_direction,device_id
survey1,1587661220000,2H,1H,-1,a748ee1a-1d0b-4ae9-9074-279a2b6ba524

View File

@ -922,8 +922,8 @@
</div>
<div class="admonition hint">
<p class="admonition-title">Deleting RAPIDS output</p>
<p>If you want to delete all the output files RAPIDS produces you can execute the following command (the content of these folders will be deleted: <code>data/raw</code>, <code>data/interim</code>, <code>data/processed</code>, <code>reports/figures</code>, and <code>reports/compliance</code>)</p>
<div class="highlight"><pre><span></span><code>./rapids -j1 -R clean
<p>If you want to delete all the output files RAPIDS produces you can execute the following command:</p>
<div class="highlight"><pre><span></span><code>./rapids -j1 --delete-all-output
</code></pre></div>
</div>

Binary file not shown.

View File

@ -910,7 +910,7 @@
<span class="nt">START_DATE</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">2020-01-01</span> <span class="c1"># this can also be empty</span>
<span class="nt">END_DATE</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">2021-01-01</span> <span class="c1"># this can also be empty</span>
</code></pre></div></p>
<p>4. <code>[DAY_SEGMENTS][TYPE]</code> should be the default <code>PERIODIC</code>. Change <code>[DAY_SEGMENTS][FILE]</code> with the path of a file containing the following lines:
<p>4. <code>[TIME_SEGMENTS][TYPE]</code> should be the default <code>PERIODIC</code>. Change <code>[TIME_SEGMENTS][FILE]</code> with the path of a file containing the following lines:
<div class="highlight"><pre><span></span><code>label,start_time,length,repeats_on,repeats_value
daily,00:00:00,23H 59M 59S,every_day,0
night,00:00:00,5H 59M 59S,every_day,0
@ -930,9 +930,9 @@ MY_GROUP
# ... other irrelevant sections
DAY_SEGMENTS: &amp;day_segments
TIME_SEGMENTS: &amp;time_segments
TYPE: PERIODIC
FILE: &quot;data/external/daysegments_periodic.csv&quot; # make sure the three lines specified above are in the file
FILE: &quot;data/external/timesegments_periodic.csv&quot; # make sure the three lines specified above are in the file
INCLUDE_PAST_PERIODIC_SEGMENTS: FALSE
# No need to change this if you collected AWARE data on a database and your credentials are grouped under `MY_GROUP` in `.env`
@ -967,7 +967,7 @@ PHONE_CALLS:
<div class="highlight"><pre><span></span><code>./rapids -j1
</code></pre></div></p>
</li>
<li>The call features for daily and morning day segments will be in
<li>The call features for daily and morning time segments will be in
<div class="highlight"><pre><span></span><code>/data/processed/features/p01/phone_calls.csv
</code></pre></div></li>
</ol>

View File

@ -1103,12 +1103,12 @@
<p>Add your provider <strong>function</strong> in your provider script. The name of such function should be <code>[providername]_features</code>, in our example <code>vega_features</code></p>
<div class="admonition info">
<p class="admonition-title">Python function</p>
<div class="highlight"><pre><span></span><code><span class="k">def</span> <span class="p">[</span><span class="n">providername</span><span class="p">]</span><span class="n">_features</span><span class="p">(</span><span class="n">sensor_data_files</span><span class="p">,</span> <span class="n">day_segment</span><span class="p">,</span> <span class="n">provider</span><span class="p">,</span> <span class="n">filter_data_by_segment</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<div class="highlight"><pre><span></span><code><span class="k">def</span> <span class="p">[</span><span class="n">providername</span><span class="p">]</span><span class="n">_features</span><span class="p">(</span><span class="n">sensor_data_files</span><span class="p">,</span> <span class="n">time_segment</span><span class="p">,</span> <span class="n">provider</span><span class="p">,</span> <span class="n">filter_data_by_segment</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
</code></pre></div>
</div>
<div class="admonition info">
<p class="admonition-title">R function</p>
<div class="highlight"><pre><span></span><code><span class="p">[</span><span class="n">providername</span><span class="p">]</span>_<span class="n">features</span> <span class="o">&lt;-</span> <span class="nf">function</span><span class="p">(</span><span class="n">sensor_data</span><span class="p">,</span> <span class="n">day_segment</span><span class="p">,</span> <span class="n">provider</span><span class="p">)</span>
<div class="highlight"><pre><span></span><code><span class="p">[</span><span class="n">providername</span><span class="p">]</span>_<span class="n">features</span> <span class="o">&lt;-</span> <span class="nf">function</span><span class="p">(</span><span class="n">sensor_data</span><span class="p">,</span> <span class="n">time_segment</span><span class="p">,</span> <span class="n">provider</span><span class="p">)</span>
</code></pre></div>
</div>
</li>
@ -1128,8 +1128,8 @@
<td>Path to the CSV file containing the data of a single participant. This data has been cleaned and preprocessed. Your function will be automatically called for each participant in your study (in the <code>[PIDS]</code> array in <code>config.yaml</code>)</td>
</tr>
<tr>
<td><code>day_segment</code></td>
<td>The label of the day segment that should be processed.</td>
<td><code>time_segment</code></td>
<td>The label of the time segment that should be processed.</td>
</tr>
<tr>
<td><code>provider</code></td>
@ -1154,31 +1154,31 @@
</code></pre></div>
<p>Note that phone&rsquo;s battery, screen, and activity recognition data is given as episodes instead of event rows (for example, start and end timestamps of the periods the phone screen was on)</p>
</details>
<details class="info"><summary>2. Filter your data to process only those rows that belong to <code>day_segment</code></summary><p>This step is only one line of code, but to undersand why we need it, keep reading.
<div class="highlight"><pre><span></span><code><span class="n">acc_data</span> <span class="o">=</span> <span class="n">filter_data_by_segment</span><span class="p">(</span><span class="n">acc_data</span><span class="p">,</span> <span class="n">day_segment</span><span class="p">)</span>
<details class="info"><summary>2. Filter your data to process only those rows that belong to <code>time_segment</code></summary><p>This step is only one line of code, but to undersand why we need it, keep reading.
<div class="highlight"><pre><span></span><code><span class="n">acc_data</span> <span class="o">=</span> <span class="n">filter_data_by_segment</span><span class="p">(</span><span class="n">acc_data</span><span class="p">,</span> <span class="n">time_segment</span><span class="p">)</span>
</code></pre></div></p>
<p>You should use the <code>filter_data_by_segment()</code> function to process and group those rows that belong to each of the <a href="../../setup/configuration/#day-segments">day segments RAPIDS could be configured with</a>.</p>
<p>Let&rsquo;s understand the <code>filter_data_by_segment()</code> function with an example. A RAPIDS user can extract features on any arbitrary <a href="../../setup/configuration/#day-segments">day segment</a>. A day segment is a period of time that has a label and one or more instances. For example, the user (or you) could have requested features on a daily, weekly, and week-end basis for <code>p01</code>. The labels are arbritrary and the instances depend on the days a participant was monitored for: </p>
<p>You should use the <code>filter_data_by_segment()</code> function to process and group those rows that belong to each of the <a href="../../setup/configuration/#time-segments">time segments RAPIDS could be configured with</a>.</p>
<p>Let&rsquo;s understand the <code>filter_data_by_segment()</code> function with an example. A RAPIDS user can extract features on any arbitrary <a href="../../setup/configuration/#time-segments">time segment</a>. A time segment is a period of time that has a label and one or more instances. For example, the user (or you) could have requested features on a daily, weekly, and week-end basis for <code>p01</code>. The labels are arbritrary and the instances depend on the days a participant was monitored for: </p>
<ul>
<li>the daily segment could be named <code>my_days</code> and if <code>p01</code> was monitored for 14 days, it would have 14 instances</li>
<li>the weekly segment could be named <code>my_weeks</code> and if <code>p01</code> was monitored for 14 days, it would have 2 instances.</li>
<li>the weekend segment could be named <code>my_weekends</code> and if <code>p01</code> was monitored for 14 days, it would have 2 instances.</li>
</ul>
<p>For this example, RAPIDS will call your provider function three times for <code>p01</code>, once where <code>day_segment</code> is <code>my_days</code>, once where <code>day_segment</code> is <code>my_weeks</code> and once where <code>day_segment</code> is <code>my_weekends</code>. In this example not every row in <code>p01</code>&lsquo;s data needs to take part in the feature computation for either segment <strong>and</strong> the rows need to be grouped differently. </p>
<p>Thus <code>filter_data_by_segment()</code> comes in handy, it will return a data frame that contains the rows that were logged during a day segment plus an extra column called <code>local_segment</code>. This new column will have as many unique values as day segment instances exist (14, 2, and 2 for our <code>p01</code>&lsquo;s <code>my_days</code>, <code>my_weeks</code>, and <code>my_weekends</code> examples). After filtering, <strong>you should group the data frame by this column and compute any desired features</strong>, for example:</p>
<p>For this example, RAPIDS will call your provider function three times for <code>p01</code>, once where <code>time_segment</code> is <code>my_days</code>, once where <code>time_segment</code> is <code>my_weeks</code> and once where <code>time_segment</code> is <code>my_weekends</code>. In this example not every row in <code>p01</code>&lsquo;s data needs to take part in the feature computation for either segment <strong>and</strong> the rows need to be grouped differently. </p>
<p>Thus <code>filter_data_by_segment()</code> comes in handy, it will return a data frame that contains the rows that were logged during a time segment plus an extra column called <code>local_segment</code>. This new column will have as many unique values as time segment instances exist (14, 2, and 2 for our <code>p01</code>&lsquo;s <code>my_days</code>, <code>my_weeks</code>, and <code>my_weekends</code> examples). After filtering, <strong>you should group the data frame by this column and compute any desired features</strong>, for example:</p>
<div class="highlight"><pre><span></span><code><span class="n">acc_features</span><span class="p">[</span><span class="s2">&quot;maxmagnitude&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">acc_data</span><span class="o">.</span><span class="n">groupby</span><span class="p">([</span><span class="s2">&quot;local_segment&quot;</span><span class="p">])[</span><span class="s2">&quot;magnitude&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">max</span><span class="p">()</span>
</code></pre></div>
<p>The reason RAPIDS does not filter the participant&rsquo;s data set for you is because your code might need to compute something based on a participant&rsquo;s complete dataset before computing their features. For example, you might want to identify the number that called a participant the most throughout the study before computing a feature with the number of calls the participant received from this number.</p>
</details>
<details class="info"><summary>3. Return a data frame with your features</summary><p>After filtering, grouping your data, and computing your features, your provider function should return a data frame that has:</p>
<ul>
<li>One row per day segment instance (e.g. 14 our <code>p01</code>&lsquo;s <code>my_days</code> example)</li>
<li>One row per time segment instance (e.g. 14 our <code>p01</code>&lsquo;s <code>my_days</code> example)</li>
<li>The <code>local_segment</code> column added by <code>filter_data_by_segment()</code></li>
<li>One column per feature. By convention the name of your features should only contain letters or numbers (<code>feature1</code>). RAPIDS will automatically add the right sensor and provider prefix (<code>phone_accelerometr_vega_</code>)</li>
</ul>
</details>
<details class="example"><summary><code>PHONE_ACCELEROMETER</code> Provider Example</summary><p>For your reference, this a short example of our own provider (<code>RAPIDS</code>) for <code>PHONE_ACCELEROMETER</code> that computes five acceleration features</p>
<div class="highlight"><pre><span></span><code><span class="k">def</span> <span class="nf">rapids_features</span><span class="p">(</span><span class="n">sensor_data_files</span><span class="p">,</span> <span class="n">day_segment</span><span class="p">,</span> <span class="n">provider</span><span class="p">,</span> <span class="n">filter_data_by_segment</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<div class="highlight"><pre><span></span><code><span class="k">def</span> <span class="nf">rapids_features</span><span class="p">(</span><span class="n">sensor_data_files</span><span class="p">,</span> <span class="n">time_segment</span><span class="p">,</span> <span class="n">provider</span><span class="p">,</span> <span class="n">filter_data_by_segment</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="n">acc_data</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">read_csv</span><span class="p">(</span><span class="n">sensor_data_files</span><span class="p">[</span><span class="s2">&quot;sensor_data&quot;</span><span class="p">])</span>
<span class="n">requested_features</span> <span class="o">=</span> <span class="n">provider</span><span class="p">[</span><span class="s2">&quot;FEATURES&quot;</span><span class="p">]</span>
@ -1189,7 +1189,7 @@
<span class="n">acc_features</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">(</span><span class="n">columns</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;local_segment&quot;</span><span class="p">]</span> <span class="o">+</span> <span class="n">features_to_compute</span><span class="p">)</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">acc_data</span><span class="o">.</span><span class="n">empty</span><span class="p">:</span>
<span class="n">acc_data</span> <span class="o">=</span> <span class="n">filter_data_by_segment</span><span class="p">(</span><span class="n">acc_data</span><span class="p">,</span> <span class="n">day_segment</span><span class="p">)</span>
<span class="n">acc_data</span> <span class="o">=</span> <span class="n">filter_data_by_segment</span><span class="p">(</span><span class="n">acc_data</span><span class="p">,</span> <span class="n">time_segment</span><span class="p">)</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">acc_data</span><span class="o">.</span><span class="n">empty</span><span class="p">:</span>
<span class="n">acc_features</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">()</span>

View File

@ -1016,9 +1016,9 @@
</details>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments</p>
<p class="admonition-title">Available time segments</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
</ul>
</div>
<div class="admonition info">
@ -1062,52 +1062,52 @@
<tr>
<td>maxhr</td>
<td>beats/mins</td>
<td>The maximum heart rate during a day segment.</td>
<td>The maximum heart rate during a time segment.</td>
</tr>
<tr>
<td>minhr</td>
<td>beats/mins</td>
<td>The minimum heart rate during a day segment.</td>
<td>The minimum heart rate during a time segment.</td>
</tr>
<tr>
<td>avghr</td>
<td>beats/mins</td>
<td>The average heart rate during a day segment.</td>
<td>The average heart rate during a time segment.</td>
</tr>
<tr>
<td>medianhr</td>
<td>beats/mins</td>
<td>The median of heart rate during a day segment.</td>
<td>The median of heart rate during a time segment.</td>
</tr>
<tr>
<td>modehr</td>
<td>beats/mins</td>
<td>The mode of heart rate during a day segment.</td>
<td>The mode of heart rate during a time segment.</td>
</tr>
<tr>
<td>stdhr</td>
<td>beats/mins</td>
<td>The standard deviation of heart rate during a day segment.</td>
<td>The standard deviation of heart rate during a time segment.</td>
</tr>
<tr>
<td>diffmaxmodehr</td>
<td>beats/mins</td>
<td>The difference between the maximum and mode heart rate during a day segment.</td>
<td>The difference between the maximum and mode heart rate during a time segment.</td>
</tr>
<tr>
<td>diffminmodehr</td>
<td>beats/mins</td>
<td>The difference between the mode and minimum heart rate during a day segment.</td>
<td>The difference between the mode and minimum heart rate during a time segment.</td>
</tr>
<tr>
<td>entropyhr</td>
<td>nats</td>
<td>Shannons entropy measurement based on heart rate during a day segment.</td>
<td>Shannons entropy measurement based on heart rate during a time segment.</td>
</tr>
<tr>
<td>minutesonZONE</td>
<td>minutes</td>
<td>Number of minutes the users heart rate fell within each <code>heartrate_zone</code> during a day segment.</td>
<td>Number of minutes the users heart rate fell within each <code>heartrate_zone</code> during a time segment.</td>
</tr>
</tbody>
</table>

View File

@ -1028,7 +1028,7 @@
</details>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments</p>
<p class="admonition-title">Available time segments</p>
<ul>
<li>Only available for segments that span 1 or more complete days (e.g. Jan 1<sup>st</sup> 00:00 to Jan 3<sup>rd</sup> 23:59)</li>
</ul>
@ -1074,82 +1074,82 @@
<tr>
<td>maxrestinghr</td>
<td>beats/mins</td>
<td>The maximum daily resting heart rate during a day segment.</td>
<td>The maximum daily resting heart rate during a time segment.</td>
</tr>
<tr>
<td>minrestinghr</td>
<td>beats/mins</td>
<td>The minimum daily resting heart rate during a day segment.</td>
<td>The minimum daily resting heart rate during a time segment.</td>
</tr>
<tr>
<td>avgrestinghr</td>
<td>beats/mins</td>
<td>The average daily resting heart rate during a day segment.</td>
<td>The average daily resting heart rate during a time segment.</td>
</tr>
<tr>
<td>medianrestinghr</td>
<td>beats/mins</td>
<td>The median of daily resting heart rate during a day segment.</td>
<td>The median of daily resting heart rate during a time segment.</td>
</tr>
<tr>
<td>moderestinghr</td>
<td>beats/mins</td>
<td>The mode of daily resting heart rate during a day segment.</td>
<td>The mode of daily resting heart rate during a time segment.</td>
</tr>
<tr>
<td>stdrestinghr</td>
<td>beats/mins</td>
<td>The standard deviation of daily resting heart rate during a day segment.</td>
<td>The standard deviation of daily resting heart rate during a time segment.</td>
</tr>
<tr>
<td>diffmaxmoderestinghr</td>
<td>beats/mins</td>
<td>The difference between the maximum and mode daily resting heart rate during a day segment.</td>
<td>The difference between the maximum and mode daily resting heart rate during a time segment.</td>
</tr>
<tr>
<td>diffminmoderestinghr</td>
<td>beats/mins</td>
<td>The difference between the mode and minimum daily resting heart rate during a day segment.</td>
<td>The difference between the mode and minimum daily resting heart rate during a time segment.</td>
</tr>
<tr>
<td>entropyrestinghr</td>
<td>nats</td>
<td>Shannons entropy measurement based on daily resting heart rate during a day segment.</td>
<td>Shannons entropy measurement based on daily resting heart rate during a time segment.</td>
</tr>
<tr>
<td>sumcaloriesZONE</td>
<td>cals</td>
<td>The total daily calories burned within <code>heartrate_zone</code> during a day segment.</td>
<td>The total daily calories burned within <code>heartrate_zone</code> during a time segment.</td>
</tr>
<tr>
<td>maxcaloriesZONE</td>
<td>cals</td>
<td>The maximum daily calories burned within <code>heartrate_zone</code> during a day segment.</td>
<td>The maximum daily calories burned within <code>heartrate_zone</code> during a time segment.</td>
</tr>
<tr>
<td>mincaloriesZONE</td>
<td>cals</td>
<td>The minimum daily calories burned within <code>heartrate_zone</code> during a day segment.</td>
<td>The minimum daily calories burned within <code>heartrate_zone</code> during a time segment.</td>
</tr>
<tr>
<td>avgcaloriesZONE</td>
<td>cals</td>
<td>The average daily calories burned within <code>heartrate_zone</code> during a day segment.</td>
<td>The average daily calories burned within <code>heartrate_zone</code> during a time segment.</td>
</tr>
<tr>
<td>mediancaloriesZONE</td>
<td>cals</td>
<td>The median of daily calories burned within <code>heartrate_zone</code> during a day segment.</td>
<td>The median of daily calories burned within <code>heartrate_zone</code> during a time segment.</td>
</tr>
<tr>
<td>stdcaloriesZONE</td>
<td>cals</td>
<td>The standard deviation of daily calories burned within <code>heartrate_zone</code> during a day segment.</td>
<td>The standard deviation of daily calories burned within <code>heartrate_zone</code> during a time segment.</td>
</tr>
<tr>
<td>entropycaloriesZONE</td>
<td>nats</td>
<td>Shannons entropy measurement based on daily calories burned within <code>heartrate_zone</code> during a day segment.</td>
<td>Shannons entropy measurement based on daily calories burned within <code>heartrate_zone</code> during a time segment.</td>
</tr>
</tbody>
</table>

View File

@ -1181,7 +1181,7 @@
</details>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments</p>
<p class="admonition-title">Available time segments</p>
<ul>
<li>Only available for segments that span 1 or more complete days (e.g. Jan 1<sup>st</sup> 00:00 to Jan 3<sup>rd</sup> 23:59)</li>
</ul>
@ -1231,62 +1231,62 @@
<tr>
<td>countepisodeTYPE</td>
<td>episodes</td>
<td>Number of sleep episodes for a certain sleep type during a day segment.</td>
<td>Number of sleep episodes for a certain sleep type during a time segment.</td>
</tr>
<tr>
<td>avgefficiencyTYPE</td>
<td>scores</td>
<td>Average sleep efficiency for a certain sleep type during a day segment.</td>
<td>Average sleep efficiency for a certain sleep type during a time segment.</td>
</tr>
<tr>
<td>sumdurationafterwakeupTYPE</td>
<td>minutes</td>
<td>Total duration the user stayed in bed after waking up for a certain sleep type during a day segment.</td>
<td>Total duration the user stayed in bed after waking up for a certain sleep type during a time segment.</td>
</tr>
<tr>
<td>sumdurationasleepTYPE</td>
<td>minutes</td>
<td>Total sleep duration for a certain sleep type during a day segment.</td>
<td>Total sleep duration for a certain sleep type during a time segment.</td>
</tr>
<tr>
<td>sumdurationawakeTYPE</td>
<td>minutes</td>
<td>Total duration the user stayed awake but still in bed for a certain sleep type during a day segment.</td>
<td>Total duration the user stayed awake but still in bed for a certain sleep type during a time segment.</td>
</tr>
<tr>
<td>sumdurationtofallasleepTYPE</td>
<td>minutes</td>
<td>Total duration the user spent to fall asleep for a certain sleep type during a day segment.</td>
<td>Total duration the user spent to fall asleep for a certain sleep type during a time segment.</td>
</tr>
<tr>
<td>sumdurationinbedTYPE</td>
<td>minutes</td>
<td>Total duration the user stayed in bed (sumdurationtofallasleep + sumdurationawake + sumdurationasleep + sumdurationafterwakeup) for a certain sleep type during a day segment.</td>
<td>Total duration the user stayed in bed (sumdurationtofallasleep + sumdurationawake + sumdurationasleep + sumdurationafterwakeup) for a certain sleep type during a time segment.</td>
</tr>
<tr>
<td>avgdurationafterwakeupTYPE</td>
<td>minutes</td>
<td>Average duration the user stayed in bed after waking up for a certain sleep type during a day segment.</td>
<td>Average duration the user stayed in bed after waking up for a certain sleep type during a time segment.</td>
</tr>
<tr>
<td>avgdurationasleepTYPE</td>
<td>minutes</td>
<td>Average sleep duration for a certain sleep type during a day segment.</td>
<td>Average sleep duration for a certain sleep type during a time segment.</td>
</tr>
<tr>
<td>avgdurationawakeTYPE</td>
<td>minutes</td>
<td>Average duration the user stayed awake but still in bed for a certain sleep type during a day segment.</td>
<td>Average duration the user stayed awake but still in bed for a certain sleep type during a time segment.</td>
</tr>
<tr>
<td>avgdurationtofallasleepTYPE</td>
<td>minutes</td>
<td>Average duration the user spent to fall asleep for a certain sleep type during a day segment.</td>
<td>Average duration the user spent to fall asleep for a certain sleep type during a time segment.</td>
</tr>
<tr>
<td>avgdurationinbedTYPE</td>
<td>minutes</td>
<td>Average duration the user stayed in bed (sumdurationtofallasleep + sumdurationawake + sumdurationasleep + sumdurationafterwakeup) for a certain sleep type during a day segment.</td>
<td>Average duration the user stayed in bed (sumdurationtofallasleep + sumdurationawake + sumdurationasleep + sumdurationafterwakeup) for a certain sleep type during a time segment.</td>
</tr>
</tbody>
</table>

View File

@ -1012,9 +1012,9 @@
</details>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments</p>
<p class="admonition-title">Available time segments</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
</ul>
</div>
<div class="admonition info">
@ -1049,7 +1049,7 @@
</tr>
<tr>
<td><code>[INCLUDE_ZERO_STEP_ROWS]</code></td>
<td>Whether or not to include day segments with a 0 step count during the whole day.</td>
<td>Whether or not to include time segments with a 0 step count during the whole day.</td>
</tr>
</tbody>
</table>
@ -1066,87 +1066,87 @@
<tr>
<td>sumsteps</td>
<td>steps</td>
<td>The total step count during a day segment.</td>
<td>The total step count during a time segment.</td>
</tr>
<tr>
<td>maxsteps</td>
<td>steps</td>
<td>The maximum step count during a day segment.</td>
<td>The maximum step count during a time segment.</td>
</tr>
<tr>
<td>minsteps</td>
<td>steps</td>
<td>The minimum step count during a day segment.</td>
<td>The minimum step count during a time segment.</td>
</tr>
<tr>
<td>avgsteps</td>
<td>steps</td>
<td>The average step count during a day segment.</td>
<td>The average step count during a time segment.</td>
</tr>
<tr>
<td>stdsteps</td>
<td>steps</td>
<td>The standard deviation of step count during a day segment.</td>
<td>The standard deviation of step count during a time segment.</td>
</tr>
<tr>
<td>countepisodesedentarybout</td>
<td>bouts</td>
<td>Number of sedentary bouts during a day segment.</td>
<td>Number of sedentary bouts during a time segment.</td>
</tr>
<tr>
<td>sumdurationsedentarybout</td>
<td>minutes</td>
<td>Total duration of all sedentary bouts during a day segment.</td>
<td>Total duration of all sedentary bouts during a time segment.</td>
</tr>
<tr>
<td>maxdurationsedentarybout</td>
<td>minutes</td>
<td>The maximum duration of any sedentary bout during a day segment.</td>
<td>The maximum duration of any sedentary bout during a time segment.</td>
</tr>
<tr>
<td>mindurationsedentarybout</td>
<td>minutes</td>
<td>The minimum duration of any sedentary bout during a day segment.</td>
<td>The minimum duration of any sedentary bout during a time segment.</td>
</tr>
<tr>
<td>avgdurationsedentarybout</td>
<td>minutes</td>
<td>The average duration of sedentary bouts during a day segment.</td>
<td>The average duration of sedentary bouts during a time segment.</td>
</tr>
<tr>
<td>stddurationsedentarybout</td>
<td>minutes</td>
<td>The standard deviation of the duration of sedentary bouts during a day segment.</td>
<td>The standard deviation of the duration of sedentary bouts during a time segment.</td>
</tr>
<tr>
<td>countepisodeactivebout</td>
<td>bouts</td>
<td>Number of active bouts during a day segment.</td>
<td>Number of active bouts during a time segment.</td>
</tr>
<tr>
<td>sumdurationactivebout</td>
<td>minutes</td>
<td>Total duration of all active bouts during a day segment.</td>
<td>Total duration of all active bouts during a time segment.</td>
</tr>
<tr>
<td>maxdurationactivebout</td>
<td>minutes</td>
<td>The maximum duration of any active bout during a day segment.</td>
<td>The maximum duration of any active bout during a time segment.</td>
</tr>
<tr>
<td>mindurationactivebout</td>
<td>minutes</td>
<td>The minimum duration of any active bout during a day segment.</td>
<td>The minimum duration of any active bout during a time segment.</td>
</tr>
<tr>
<td>avgdurationactivebout</td>
<td>minutes</td>
<td>The average duration of active bouts during a day segment.</td>
<td>The average duration of active bouts during a time segment.</td>
</tr>
<tr>
<td>stddurationactivebout</td>
<td>minutes</td>
<td>The standard deviation of the duration of active bouts during a day segment.</td>
<td>The standard deviation of the duration of active bouts during a time segment.</td>
</tr>
</tbody>
</table>

View File

@ -1012,7 +1012,7 @@
</details>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments</p>
<p class="admonition-title">Available time segments</p>
<ul>
<li>Only available for segments that span 1 or more complete days (e.g. Jan 1<sup>st</sup> 00:00 to Jan 3<sup>rd</sup> 23:59)</li>
</ul>
@ -1058,27 +1058,27 @@
<tr>
<td>maxsumsteps</td>
<td>steps</td>
<td>The maximum daily step count during a day segment.</td>
<td>The maximum daily step count during a time segment.</td>
</tr>
<tr>
<td>minsumsteps</td>
<td>steps</td>
<td>The minimum daily step count during a day segment.</td>
<td>The minimum daily step count during a time segment.</td>
</tr>
<tr>
<td>avgsumsteps</td>
<td>steps</td>
<td>The average daily step count during a day segment.</td>
<td>The average daily step count during a time segment.</td>
</tr>
<tr>
<td>mediansumsteps</td>
<td>steps</td>
<td>The median of daily step count during a day segment.</td>
<td>The median of daily step count during a time segment.</td>
</tr>
<tr>
<td>stdsumsteps</td>
<td>steps</td>
<td>The standard deviation of daily step count during a day segment.</td>
<td>The standard deviation of daily step count during a time segment.</td>
</tr>
</tbody>
</table>

View File

@ -970,9 +970,9 @@
</table>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android and iOS</li>
</ul>
</div>
@ -1049,9 +1049,9 @@
<h2 id="panda-provider">PANDA provider<a class="headerlink" href="#panda-provider" title="Permanent link">&para;</a></h2>
<p>These features are based on the work by <a href="../../citation#panda-accelerometer">Panda et al</a>.</p>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android and iOS</li>
</ul>
</div>

View File

@ -964,9 +964,9 @@
</table>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android and iOS</li>
</ul>
</div>

View File

@ -973,9 +973,9 @@
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<p>The app category (genre) catalogue used in these features was originally created by <a href="../../citation#stachl-applications-foreground">Stachl et al</a>.</p>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android only</li>
</ul>
</div>
@ -1045,17 +1045,17 @@
<tr>
<td>timeoffirstuse</td>
<td>minutes</td>
<td>The time in minutes between 12:00am (midnight) and the first use of a single app or apps within a category during a <code>day_segment</code></td>
<td>The time in minutes between 12:00am (midnight) and the first use of a single app or apps within a category during a <code>time_segment</code></td>
</tr>
<tr>
<td>timeoflastuse</td>
<td>minutes</td>
<td>The time in minutes between 12:00am (midnight) and the last use of a single app or apps within a category during a <code>day_segment</code></td>
<td>The time in minutes between 12:00am (midnight) and the last use of a single app or apps within a category during a <code>time_segment</code></td>
</tr>
<tr>
<td>frequencyentropy</td>
<td>nats</td>
<td>The entropy of the used apps within a category during a <code>day_segment</code> (each app is seen as a unique event, the more apps were used, the higher the entropy). This is especially relevant when computed over all apps. Entropy cannot be obtained for a single app</td>
<td>The entropy of the used apps within a category during a <code>time_segment</code> (each app is seen as a unique event, the more apps were used, the higher the entropy). This is especially relevant when computed over all apps. Entropy cannot be obtained for a single app</td>
</tr>
</tbody>
</table>

View File

@ -960,9 +960,9 @@
</table>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android and iOS</li>
</ul>
</div>

View File

@ -956,9 +956,9 @@
</table>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android only</li>
</ul>
</div>
@ -1002,17 +1002,17 @@
<tr>
<td>countscans</td>
<td>devices</td>
<td>Number of scanned devices during a <code>day_segment</code>, a device can be detected multiple times over time and these appearances are counted separately</td>
<td>Number of scanned devices during a <code>time_segment</code>, a device can be detected multiple times over time and these appearances are counted separately</td>
</tr>
<tr>
<td>uniquedevices</td>
<td>devices</td>
<td>Number of unique devices during a <code>day_segment</code> as identified by their hardware (<code>bt_address</code>) address</td>
<td>Number of unique devices during a <code>time_segment</code> as identified by their hardware (<code>bt_address</code>) address</td>
</tr>
<tr>
<td>countscansmostuniquedevice</td>
<td>scans</td>
<td>Number of scans of the most scanned device during a <code>day_segment</code> across the whole monitoring period</td>
<td>Number of scans of the most scanned device during a <code>time_segment</code> across the whole monitoring period</td>
</tr>
</tbody>
</table>

View File

@ -956,9 +956,9 @@
</table>
<h2 id="rapids-provider">RAPIDS Provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android and iOS</li>
</ul>
</div>
@ -1007,47 +1007,47 @@
<tr>
<td>count</td>
<td>calls</td>
<td>Number of calls of a particular <code>call_type</code> occurred during a particular <code>day_segment</code>.</td>
<td>Number of calls of a particular <code>call_type</code> occurred during a particular <code>time_segment</code>.</td>
</tr>
<tr>
<td>distinctcontacts</td>
<td>contacts</td>
<td>Number of distinct contacts that are associated with a particular <code>call_type</code> for a particular <code>day_segment</code></td>
<td>Number of distinct contacts that are associated with a particular <code>call_type</code> for a particular <code>time_segment</code></td>
</tr>
<tr>
<td>meanduration</td>
<td>seconds</td>
<td>The mean duration of all calls of a particular <code>call_type</code> during a particular <code>day_segment</code>.</td>
<td>The mean duration of all calls of a particular <code>call_type</code> during a particular <code>time_segment</code>.</td>
</tr>
<tr>
<td>sumduration</td>
<td>seconds</td>
<td>The sum of the duration of all calls of a particular <code>call_type</code> during a particular <code>day_segment</code>.</td>
<td>The sum of the duration of all calls of a particular <code>call_type</code> during a particular <code>time_segment</code>.</td>
</tr>
<tr>
<td>minduration</td>
<td>seconds</td>
<td>The duration of the shortest call of a particular <code>call_type</code> during a particular <code>day_segment</code>.</td>
<td>The duration of the shortest call of a particular <code>call_type</code> during a particular <code>time_segment</code>.</td>
</tr>
<tr>
<td>maxduration</td>
<td>seconds</td>
<td>The duration of the longest call of a particular <code>call_type</code> during a particular <code>day_segment</code>.</td>
<td>The duration of the longest call of a particular <code>call_type</code> during a particular <code>time_segment</code>.</td>
</tr>
<tr>
<td>stdduration</td>
<td>seconds</td>
<td>The standard deviation of the duration of all the calls of a particular <code>call_type</code> during a particular <code>day_segment</code>.</td>
<td>The standard deviation of the duration of all the calls of a particular <code>call_type</code> during a particular <code>time_segment</code>.</td>
</tr>
<tr>
<td>modeduration</td>
<td>seconds</td>
<td>The mode of the duration of all the calls of a particular <code>call_type</code> during a particular <code>day_segment</code>.</td>
<td>The mode of the duration of all the calls of a particular <code>call_type</code> during a particular <code>time_segment</code>.</td>
</tr>
<tr>
<td>entropyduration</td>
<td>nats</td>
<td>The estimate of the Shannon entropy for the the duration of all the calls of a particular <code>call_type</code> during a particular <code>day_segment</code>.</td>
<td>The estimate of the Shannon entropy for the the duration of all the calls of a particular <code>call_type</code> during a particular <code>time_segment</code>.</td>
</tr>
<tr>
<td>timefirstcall</td>
@ -1062,7 +1062,7 @@
<tr>
<td>countmostfrequentcontact</td>
<td>calls</td>
<td>The number of calls of a particular <code>call_type</code> during a particular <code>day_segment</code> of the most frequent contact throughout the monitored period.</td>
<td>The number of calls of a particular <code>call_type</code> during a particular <code>time_segment</code> of the most frequent contact throughout the monitored period.</td>
</tr>
</tbody>
</table>
@ -1079,12 +1079,12 @@
<tr>
<td>count</td>
<td>calls</td>
<td>Number of <code>missed</code> calls that occurred during a particular <code>day_segment</code>.</td>
<td>Number of <code>missed</code> calls that occurred during a particular <code>time_segment</code>.</td>
</tr>
<tr>
<td>distinctcontacts</td>
<td>contacts</td>
<td>Number of distinct contacts that are associated with <code>missed</code> calls for a particular <code>day_segment</code></td>
<td>Number of distinct contacts that are associated with <code>missed</code> calls for a particular <code>time_segment</code></td>
</tr>
<tr>
<td>timefirstcall</td>
@ -1099,7 +1099,7 @@
<tr>
<td>countmostfrequentcontact</td>
<td>calls</td>
<td>The number of <code>missed</code> calls during a particular <code>day_segment</code> of the most frequent contact throughout the monitored period.</td>
<td>The number of <code>missed</code> calls during a particular <code>time_segment</code> of the most frequent contact throughout the monitored period.</td>
</tr>
</tbody>
</table>

View File

@ -960,9 +960,9 @@
</table>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android only</li>
</ul>
</div>
@ -1060,12 +1060,12 @@
<tr>
<td>timefirstconversation</td>
<td>minutes</td>
<td>Minutes since midnight when the first conversation for a day segment was detected</td>
<td>Minutes since midnight when the first conversation for a time segment was detected</td>
</tr>
<tr>
<td>timelastconversation</td>
<td>minutes</td>
<td>Minutes since midnight when the last conversation for a day segment was detected</td>
<td>Minutes since midnight when the last conversation for a time segment was detected</td>
</tr>
<tr>
<td>noisesumenergy</td>

View File

@ -939,7 +939,7 @@
<h1 id="phone-data-yield">Phone Data Yield<a class="headerlink" href="#phone-data-yield" title="Permanent link">&para;</a></h1>
<p>This is a combinatorial sensor which means that we use the data from multiple sensors to extract data yield features. Data yield features can be used to remove rows (<a href="../../setup/configuration/#day-segments">day segments</a>) that do not contain enough data. You should decide what is your &ldquo;enough&rdquo; threshold depending on the type of sensors you collected (frequency vs event based, e.g. acceleroemter vs calls), the length of your study, and the rates of missing data that your analysis could handle.</p>
<p>This is a combinatorial sensor which means that we use the data from multiple sensors to extract data yield features. Data yield features can be used to remove rows (<a href="../../setup/configuration/#time-segments">time segments</a>) that do not contain enough data. You should decide what is your &ldquo;enough&rdquo; threshold depending on the type of sensors you collected (frequency vs event based, e.g. acceleroemter vs calls), the length of your study, and the rates of missing data that your analysis could handle.</p>
<div class="admonition hint">
<p class="admonition-title">Why is data yield important?</p>
<p>Imagine that you want to extract <code>PHONE_CALL</code> features on daily segments (<code>00:00</code> to <code>23:59</code>). Let&rsquo;s say that on day 1 the phone logged 10 calls and 23 hours of data from other sensors and on day 2 the phone logged 10 calls and only 2 hours of data from other sensors. It&rsquo;s more likely that other calls were placed on the 22 hours of data that you didn&rsquo;t log on day 2 than on the 1 hour of data you didn&rsquo;t log on day 1, and so including day 2 in your analysis could bias your results.</p>
@ -982,11 +982,11 @@
<li>A valid minute is any 60 second window when any phone sensor logged at least 1 row of data</li>
<li>A valid hour is any 60 minute window with at least X valid minutes. The X or threshold is given by <code>[MINUTE_RATIO_THRESHOLD_FOR_VALID_YIELDED_HOURS]</code></li>
</ul>
<p>The timestamps of all sensors are concatenated and then grouped per day segment. Minute and hour windows are created from the beginning of each day segment instance and these windows are marked as valid based on the definitions above. The duration of each day segment is taken into account to compute the features described below.</p>
<p>The timestamps of all sensors are concatenated and then grouped per time segment. Minute and hour windows are created from the beginning of each time segment instance and these windows are marked as valid based on the definitions above. The duration of each time segment is taken into account to compute the features described below.</p>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android and iOS</li>
</ul>
</div>
@ -1035,12 +1035,12 @@
<tr>
<td>ratiovalidyieldedminutes</td>
<td>rows</td>
<td>The ratio between the number of valid minutes and the duration in minutes of a day segment.</td>
<td>The ratio between the number of valid minutes and the duration in minutes of a time segment.</td>
</tr>
<tr>
<td>ratiovalidyieldedhours</td>
<td>lux</td>
<td>The ratio between the number of valid hours and the duration in hours of a day segment. If the day segment is shorter than 1 hour this feature will always be 1.</td>
<td>The ratio between the number of valid hours and the duration in hours of a time segment. If the time segment is shorter than 1 hour this feature will always be 1.</td>
</tr>
</tbody>
</table>
@ -1048,8 +1048,8 @@
<p class="admonition-title">Assumptions/Observations</p>
<ol>
<li>
<p>We recommend using <code>ratiovalidyieldedminutes</code> on day segments that are shorter than two or three hours and <code>ratiovalidyieldedhours</code> for longer segments. This is because relying on yielded minutes only can be misleading when a big chunk of those missing minutes are clustered together. </p>
<p>For example, let&rsquo;s assume we are working with a 24-hour day segment that is missing 12 hours of data. Two extreme cases can occur: </p>
<p>We recommend using <code>ratiovalidyieldedminutes</code> on time segments that are shorter than two or three hours and <code>ratiovalidyieldedhours</code> for longer segments. This is because relying on yielded minutes only can be misleading when a big chunk of those missing minutes are clustered together. </p>
<p>For example, let&rsquo;s assume we are working with a 24-hour time segment that is missing 12 hours of data. Two extreme cases can occur: </p>
<p><ol type="A">
<li>the 12 missing hours are from the beginning of the segment or </li>
<li>30 minutes could be missing from every hour (24 * 30 minutes = 12 hours).</li>

View File

@ -956,9 +956,9 @@
</table>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android only</li>
</ul>
</div>

View File

@ -983,13 +983,13 @@
<div class="admonition note">
<p class="admonition-title">Assumptions/Observations</p>
<p><strong>Types of location data to use</strong>
AWARE Android and iOS clients can collect location coordinates through the phone's GPS, the network cellular towers around the phone or Google's fused location API. If you want to use only the GPS provider set <code>[LOCATIONS_TO_USE]</code> to <code>GPS</code>, if you want to use all providers (not recommended due to the difference in accuracy) set <code>[LOCATIONS_TO_USE]</code> to <code>ALL</code>, if your AWARE client was configured to use fused location only or want to focus only on this provider, set <code>[LOCATIONS_TO_USE]</code> to <code>RESAMPLE_FUSED</code>. <code>RESAMPLE_FUSED</code> takes the original fused location coordinates and replicates each pair forward in time as long as the phone was sensing data as indicated by <a href="../phone-data-quality/#phone-valid-sensed-bins"><code>PHONE_VALID_SENSED_BINS</code></a>, this is done because Google's API only logs a new location coordinate pair when it is sufficiently different in time or space from the previous one.</p>
AWARE Android and iOS clients can collect location coordinates through the phone's GPS, the network cellular towers around the phone or Google's fused location API. If you want to use only the GPS provider set <code>[LOCATIONS_TO_USE]</code> to <code>GPS</code>, if you want to use all providers (not recommended due to the difference in accuracy) set <code>[LOCATIONS_TO_USE]</code> to <code>ALL</code>, if your AWARE client was configured to use fused location only or want to focus only on this provider, set <code>[LOCATIONS_TO_USE]</code> to <code>RESAMPLE_FUSED</code>. <code>RESAMPLE_FUSED</code> takes the original fused location coordinates and replicates each pair forward in time as long as the phone was sensing data as indicated by the joined timestamps of <a href="../phone-data-yield/"><code>[PHONE_DATA_YIELD][SENSORS]</code></a>, this is done because Google's API only logs a new location coordinate pair when it is sufficiently different in time or space from the previous one.</p>
<p>There are two parameters associated with resampling fused location. <code>FUSED_RESAMPLED_CONSECUTIVE_THRESHOLD</code> (in minutes, default 30) controls the maximum gap between any two coordinate pairs to replicate the last known pair (for example, participant A's phone did not collect data between 10.30am and 10:50am and between 11:05am and 11:40am, the last known coordinate pair will be replicated during the first period but not the second, in other words, we assume that we cannot longer guarantee the participant stayed at the last known location if the phone did not sense data for more than 30 minutes). <code>FUSED_RESAMPLED_TIME_SINCE_VALID_LOCATION</code> (in minutes, default 720 or 12 hours) stops the last known fused location from being replicated longer that this threshold even if the phone was sensing data continuously (for example, participant A went home at 9pm and their phone was sensing data without gaps until 11am the next morning, the last known location will only be replicated until 9am). If you have suggestions to modify or improve this resampling, let us know.</p>
</div>
<h2 id="barnett-provider">BARNETT provider<a class="headerlink" href="#barnett-provider" title="Permanent link">&para;</a></h2>
<p>These features are based on the original open-source implementation by <a href="../../citation#barnett-locations">Barnett et al</a> and some features created by <a href="../../citation#barnett-locations">Canzian et al</a>.</p>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available only for segments that start at 00:00:00 and end at 23:59:59 of the same day (daily segments)</li>
<li>Available for Android and iOS</li>
@ -1031,7 +1031,7 @@ AWARE Android and iOS clients can collect location coordinates through the phone
</tr>
<tr>
<td><code>[MINUTES_DATA_USED]</code></td>
<td>Set to <code>True</code> to include an extra column in the final location feature file containing the number of minutes used to compute the features on each day segment. Use this for quality control purposes, the more data minutes exist for a period, the more reliable its features should be. For fused location, a single minute can contain more than one coordinate pair if the participant is moving fast enough.</td>
<td>Set to <code>True</code> to include an extra column in the final location feature file containing the number of minutes used to compute the features on each time segment. Use this for quality control purposes, the more data minutes exist for a period, the more reliable its features should be. For fused location, a single minute can contain more than one coordinate pair if the participant is moving fast enough.</td>
</tr>
</tbody>
</table>
@ -1129,9 +1129,9 @@ For a detailed description of how this is calculated, see <a href="../../citatio
<h2 id="doryab-provider">DORYAB provider<a class="headerlink" href="#doryab-provider" title="Permanent link">&para;</a></h2>
<p>These features are based on the original implementation by <a href="../../citation#doryab-locations">Doryab et al.</a>.</p>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android and iOS</li>
</ul>
</div>
@ -1179,7 +1179,7 @@ For a detailed description of how this is calculated, see <a href="../../citatio
</tr>
<tr>
<td><code>[MINUTES_DATA_USED]</code></td>
<td>Set to <code>True</code> to include an extra column in the final location feature file containing the number of minutes used to compute the features on each day segment. Use this for quality control purposes, the more data minutes exist for a period, the more reliable its features should be. For fused location, a single minute can contain more than one coordinate pair if the participant is moving fast enough.</td>
<td>Set to <code>True</code> to include an extra column in the final location feature file containing the number of minutes used to compute the features on each time segment. Use this for quality control purposes, the more data minutes exist for a period, the more reliable its features should be. For fused location, a single minute can contain more than one coordinate pair if the participant is moving fast enough.</td>
</tr>
<tr>
<td><code>[SAMPLING_FREQUENCY]</code></td>
@ -1210,17 +1210,17 @@ For a detailed description of how this is calculated, see <a href="../../citatio
<tr>
<td>totaldistance</td>
<td>meters</td>
<td>Total distance travelled in a day segment using the haversine formula.</td>
<td>Total distance travelled in a time segment using the haversine formula.</td>
</tr>
<tr>
<td>averagespeed</td>
<td>km/hr</td>
<td>Average speed in a day segment considering only the instances labeled as Moving.</td>
<td>Average speed in a time segment considering only the instances labeled as Moving.</td>
</tr>
<tr>
<td>varspeed</td>
<td>km/hr</td>
<td>Speed variance in a day segment considering only the instances labeled as Moving.</td>
<td>Speed variance in a time segment considering only the instances labeled as Moving.</td>
</tr>
<tr>
<td>circadianmovement</td>
@ -1235,7 +1235,7 @@ For a detailed description of how this is calculated, see <a href="../../citatio
<tr>
<td>numberlocationtransitions</td>
<td>transitions</td>
<td>Number of movements between any two clusters in a day segment.</td>
<td>Number of movements between any two clusters in a time segment.</td>
</tr>
<tr>
<td>radiusgyration</td>
@ -1265,7 +1265,7 @@ For a detailed description of how this is calculated, see <a href="../../citatio
<tr>
<td>outlierstimepercent</td>
<td>-</td>
<td>Ratio between the number of rows that belong to non-significant clusters divided by the total number of rows in a day segment.</td>
<td>Ratio between the number of rows that belong to non-significant clusters divided by the total number of rows in a time segment.</td>
</tr>
<tr>
<td>maxlengthstayatclusters</td>

View File

@ -956,9 +956,9 @@
</table>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android only</li>
</ul>
</div>
@ -1006,27 +1006,27 @@
<tr>
<td>count</td>
<td>messages</td>
<td>Number of messages of type <code>messages_type</code> that occurred during a particular <code>day_segment</code>.</td>
<td>Number of messages of type <code>messages_type</code> that occurred during a particular <code>time_segment</code>.</td>
</tr>
<tr>
<td>distinctcontacts</td>
<td>contacts</td>
<td>Number of distinct contacts that are associated with a particular <code>messages_type</code> during a particular <code>day_segment</code>.</td>
<td>Number of distinct contacts that are associated with a particular <code>messages_type</code> during a particular <code>time_segment</code>.</td>
</tr>
<tr>
<td>timefirstmessages</td>
<td>minutes</td>
<td>Number of minutes between 12:00am (midnight) and the first <code>message</code> of a particular <code>messages_type</code> during a particular <code>day_segment</code>.</td>
<td>Number of minutes between 12:00am (midnight) and the first <code>message</code> of a particular <code>messages_type</code> during a particular <code>time_segment</code>.</td>
</tr>
<tr>
<td>timelastmessages</td>
<td>minutes</td>
<td>Number of minutes between 12:00am (midnight) and the last <code>message</code> of a particular <code>messages_type</code> during a particular <code>day_segment</code>.</td>
<td>Number of minutes between 12:00am (midnight) and the last <code>message</code> of a particular <code>messages_type</code> during a particular <code>time_segment</code>.</td>
</tr>
<tr>
<td>countmostfrequentcontact</td>
<td>messages</td>
<td>Number of messages from the contact with the most messages of <code>messages_type</code> during a <code>day_segment</code> throughout the whole dataset of each participant.</td>
<td>Number of messages from the contact with the most messages of <code>messages_type</code> during a <code>time_segment</code> throughout the whole dataset of each participant.</td>
</tr>
</tbody>
</table>

View File

@ -956,9 +956,9 @@
</table>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android and iOS</li>
</ul>
</div>

View File

@ -956,9 +956,9 @@
</table>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android and iOS</li>
</ul>
</div>
@ -1002,17 +1002,17 @@
<tr>
<td>countscans</td>
<td>devices</td>
<td>Number of scanned WiFi access points connected during a day_segment, an access point can be detected multiple times over time and these appearances are counted separately</td>
<td>Number of scanned WiFi access points connected during a time_segment, an access point can be detected multiple times over time and these appearances are counted separately</td>
</tr>
<tr>
<td>uniquedevices</td>
<td>devices</td>
<td>Number of unique access point during a day_segment as identified by their hardware address</td>
<td>Number of unique access point during a time_segment as identified by their hardware address</td>
</tr>
<tr>
<td>countscansmostuniquedevice</td>
<td>scans</td>
<td>Number of scans of the most scanned access point during a day_segment across the whole monitoring period</td>
<td>Number of scans of the most scanned access point during a time_segment across the whole monitoring period</td>
</tr>
</tbody>
</table>

View File

@ -956,9 +956,9 @@
</table>
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments and platforms</p>
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all day segments</li>
<li>Available for all time segments</li>
<li>Available for Android only</li>
</ul>
</div>
@ -1002,17 +1002,17 @@
<tr>
<td>countscans</td>
<td>devices</td>
<td>Number of scanned WiFi access points visible during a day_segment, an access point can be detected multiple times over time and these appearances are counted separately</td>
<td>Number of scanned WiFi access points visible during a time_segment, an access point can be detected multiple times over time and these appearances are counted separately</td>
</tr>
<tr>
<td>uniquedevices</td>
<td>devices</td>
<td>Number of unique access point during a day_segment as identified by their hardware address</td>
<td>Number of unique access point during a time_segment as identified by their hardware address</td>
</tr>
<tr>
<td>countscansmostuniquedevice</td>
<td>scans</td>
<td>Number of scans of the most scanned access point during a day_segment across the whole monitoring period</td>
<td>Number of scans of the most scanned access point during a time_segment across the whole monitoring period</td>
</tr>
</tbody>
</table>

View File

@ -898,10 +898,10 @@
<p>Read this page if you want to learn more about how RAPIDS is structured. If you want to start using it go to <a href="../setup/installation/">Installation</a>, then to <a href="../setup/configuration/">Configuration</a>, and then to <a href="../setup/execution/">Execution</a></p>
</div>
<p>All paths mentioned in this page are relative to RAPIDS&rsquo; root folder.</p>
<p>If you want to extract the behavioral features that RAPIDS offers, you will only have to create or modify the <a href="../setup/configuration/#database-credentials"><code>.env</code> file</a>, <a href="../setup/configuration/#participant-files">participants files</a>, <a href="../setup/configuration/#day-segments">day segment files</a>, and the <code>config.yaml</code> file. The <code>config.yaml</code> file is the heart of RAPIDS and includes parameters to manage participants, data sources, sensor data, visualizations and more.</p>
<p>If you want to extract the behavioral features that RAPIDS offers, you will only have to create or modify the <a href="../setup/configuration/#database-credentials"><code>.env</code> file</a>, <a href="../setup/configuration/#participant-files">participants files</a>, <a href="../setup/configuration/#time-segments">time segment files</a>, and the <code>config.yaml</code> file. The <code>config.yaml</code> file is the heart of RAPIDS and includes parameters to manage participants, data sources, sensor data, visualizations and more.</p>
<p>All data is saved in <code>data/</code>. The <code>data/external/</code> folder stores any data imported or created by the user, <code>data/raw/</code> stores sensor data as imported from your database, <code>data/interim/</code> has intermediate files necessary to compute behavioral features from raw data, and <code>data/processed/</code> has all the final files with the behavioral features in folders per participant and sensor.</p>
<p>All the source code is saved in <code>src/</code>. The <code>src/data/</code> folder stores scripts to download, clean and pre-process sensor data, <code>src/features</code> has scripts to extract behavioral features organized in their respective subfolders , <code>src/models/</code> can host any script to create models or statistical analyses with the behavioral features you extract, and <code>src/visualization/</code> has scripts to create plots of the raw and processed data.</p>
<p>There are other important files and folders but only relevant if you are interested in extending RAPIDS (e.g. virtual env files, docs, tests, Dockerfile, the Snakefile, etc.). In the figure below, we represent the interactions between users and files. After a user modifies <code>config.yaml</code> and <code>.env</code> the <code>Snakefile</code> file will decide what Snakemake rules have to be executed to produce the required output files (behavioral features) and what scripts are in charge of producing such files. In addition, users can add or modifiy files in the <code>data</code> folder (for example to configure the <a href="../setup/configuration/#participant-files">participants files</a> or the <a href="../setup/configuration/#day-segments">day segment files</a>).</p>
<p>There are other important files and folders but only relevant if you are interested in extending RAPIDS (e.g. virtual env files, docs, tests, Dockerfile, the Snakefile, etc.). In the figure below, we represent the interactions between users and files. After a user modifies <code>config.yaml</code> and <code>.env</code> the <code>Snakefile</code> file will decide what Snakemake rules have to be executed to produce the required output files (behavioral features) and what scripts are in charge of producing such files. In addition, users can add or modifiy files in the <code>data</code> folder (for example to configure the <a href="../setup/configuration/#participant-files">participants files</a> or the <a href="../setup/configuration/#time-segments">time segment files</a>).</p>
<figure>
<img src="../img/files.png" width="600" />
<figcaption>Interaction diagram between the user, and important files in RAPIDS</figcaption>

View File

@ -965,7 +965,7 @@
<h1 id="welcome-to-rapids-documentation">Welcome to RAPIDS documentation<a class="headerlink" href="#welcome-to-rapids-documentation" title="Permanent link">&para;</a></h1>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>The functionality outlined in these docs is implemented in the branch <code>day_segments</code> which we will merge to <code>master</code> soon as release <code>0.1</code>. The previous (first) release of RAPIDS along with the old <a href="https://rapidspitt.readthedocs.io/en/latest/">docs</a> will be labeled <code>beta</code>. If you landed on this page feel free to look around, just have in mind that we are polishing the last rough patches before we advertise <code>0.1</code> (Nov 16, 2020)</p>
<p>The functionality outlined in these docs is implemented in the branch <code>time_segments</code> which we will merge to <code>master</code> soon as release <code>0.1</code>. The previous (first) release of RAPIDS along with the old <a href="https://rapidspitt.readthedocs.io/en/latest/">docs</a> will be labeled <code>beta</code>. If you landed on this page feel free to look around, just have in mind that we are polishing the last rough patches before we advertise <code>0.1</code> (Nov 16, 2020)</p>
</div>
<p>Reproducible Analysis Pipeline for Data Streams (RAPIDS) allows you to process smartphone and wearable data to extract <strong>behavioral features</strong> (a.k.a. digital biomarkers/phenotypes).</p>
<p>RAPIDS is open source, documented, modular, tested, and reproducible. At the moment we support smartphone data collected with <a href="https://awareframework.com/">AWARE</a> and wearable data from Fitbit devices.</p>
@ -982,13 +982,13 @@
<li><strong>Parallel execution</strong>. Thanks to Snakemake, your analysis can be executed over multiple cores without changing your code.</li>
<li><strong>Extensible code</strong>. You can easily add your own behavioral features in R or Python and keep authorship and citations.</li>
<li><strong>Timezone aware</strong>. Your data is adjusted to the specified timezone (multiple timezones suport <em>coming soon</em>).</li>
<li><strong>Flexible day segments</strong>. You can extract behavioral features on time windows of any length (e.g. 5 minutes, 3 hours, 2 days), on every day or particular days (e.g. weekends, Mondays, the 1<sup>st</sup> of each month, etc.) or around events of interest (e.g. surveys or clinical relapses).</li>
<li><strong>Flexible time segments</strong>. You can extract behavioral features on time windows of any length (e.g. 5 minutes, 3 hours, 2 days), on every day or particular days (e.g. weekends, Mondays, the 1<sup>st</sup> of each month, etc.) or around events of interest (e.g. surveys or clinical relapses).</li>
<li><strong>Tested code</strong>. We are constantly adding tests to make sure our behavioral features are correct.</li>
<li><strong>Reproducible code</strong>. You can be sure your code will run in other computers as intended thanks to R and Python virtual environments. You can share your analysis code along your publications without any overhead.</li>
<li><strong>Private</strong>. All your data is processed locally.</li>
</ol>
<h2 id="how-is-it-organized">How is it organized?<a class="headerlink" href="#how-is-it-organized" title="Permanent link">&para;</a></h2>
<p>In broad terms the <code>config.yaml</code>, <a href="../setup/configuration/#database-credentials"><code>.env</code> file</a>, <a href="../setup/configuration/#participant-files">participants files</a>, <a href="../setup/configuration/#day-segments">day segment files</a> are the only ones that you will have to modify. All data is stored in <code>data/</code> and all scripts are stored in <code>src/</code>. For more information see RAPIDS&rsquo; <a href="file-structure/">File Structure</a>.</p>
<p>In broad terms the <code>config.yaml</code>, <a href="../setup/configuration/#database-credentials"><code>.env</code> file</a>, <a href="../setup/configuration/#participant-files">participants files</a>, <a href="../setup/configuration/#time-segments">time segment files</a> are the only ones that you will have to modify. All data is stored in <code>data/</code> and all scripts are stored in <code>src/</code>. For more information see RAPIDS&rsquo; <a href="file-structure/">File Structure</a>.</p>

File diff suppressed because one or more lines are too long

View File

@ -371,11 +371,11 @@
</li>
<li class="md-nav__item">
<a href="#day-segments" class="md-nav__link">
Day Segments
<a href="#time-segments" class="md-nav__link">
Time Segments
</a>
<nav class="md-nav" aria-label="Day Segments">
<nav class="md-nav" aria-label="Time Segments">
<ul class="md-nav__list">
<li class="md-nav__item">
@ -1062,11 +1062,11 @@
</li>
<li class="md-nav__item">
<a href="#day-segments" class="md-nav__link">
Day Segments
<a href="#time-segments" class="md-nav__link">
Time Segments
</a>
<nav class="md-nav" aria-label="Day Segments">
<nav class="md-nav" aria-label="Time Segments">
<ul class="md-nav__list">
<li class="md-nav__item">
@ -1118,7 +1118,7 @@
<li>Add your <a href="#database-credentials">database credentials</a></li>
<li>Choose the <a href="#timezone-of-your-study">timezone of your study</a></li>
<li>Create your <a href="#participant-files">participants files</a></li>
<li>Select what <a href="#day-segments">day segments</a> you want to extract features on</li>
<li>Select what <a href="#time-segments">time segments</a> you want to extract features on</li>
<li>Modify your <a href="#device-data-source-configuration">device data source configuration</a></li>
<li>Select what <a href="#sensor-and-features-to-process">sensors and features</a> you want to process</li>
</ol>
@ -1344,16 +1344,16 @@ a748ee1a-1d0b-4ae9-9074-279a2b6ba524;dsadas-2324-fgsf-sdwr-gdfgs4rfsdf43,p01,jul
</div>
</div>
<hr />
<h2 id="day-segments">Day Segments<a class="headerlink" href="#day-segments" title="Permanent link">&para;</a></h2>
<p>Day segments (or epochs) are the time windows on which you want to extract behavioral features. For example, you might want to process data on every day, every morning, or only during weekends. RAPIDS offers three categories of day segments that are flexible enough to cover most use cases: <strong>frequency</strong> (short time windows every day), <strong>periodic</strong> (arbitrary time windows on any day), and <strong>event</strong> (arbitrary time windows around events of interest). See also our <a href="#segment-examples">examples</a>.</p>
<h2 id="time-segments">Time Segments<a class="headerlink" href="#time-segments" title="Permanent link">&para;</a></h2>
<p>Time segments (or epochs) are the time windows on which you want to extract behavioral features. For example, you might want to process data on every day, every morning, or only during weekends. RAPIDS offers three categories of time segments that are flexible enough to cover most use cases: <strong>frequency</strong> (short time windows every day), <strong>periodic</strong> (arbitrary time windows on any day), and <strong>event</strong> (arbitrary time windows around events of interest). See also our <a href="#segment-examples">examples</a>.</p>
<div class="tabbed-set" data-tabs="2:3"><input checked="checked" id="__tabbed_2_1" name="__tabbed_2" type="radio" /><label for="__tabbed_2_1">Frequency Segments</label><div class="tabbed-content">
<p>These segments are computed on every day and all have the same duration (for example 30 minutes). Set the following keys in your <code>config.yaml</code></p>
<div class="highlight"><pre><span></span><code><span class="nt">DAY_SEGMENTS</span><span class="p">:</span> <span class="nl">&amp;day_segments</span>
<div class="highlight"><pre><span></span><code><span class="nt">TIME_SEGMENTS</span><span class="p">:</span> <span class="nl">&amp;time_segments</span>
<span class="nt">TYPE</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">FREQUENCY</span>
<span class="nt">FILE</span><span class="p">:</span> <span class="s">&quot;data/external/your_frequency_segments.csv&quot;</span>
<span class="nt">INCLUDE_PAST_PERIODIC_SEGMENTS</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">FALSE</span>
</code></pre></div>
<p>The file pointed by <code>[DAY_SEGMENTS][FILE]</code> should have the following format and can only have 1 row.</p>
<p>The file pointed by <code>[TIME_SEGMENTS][FILE]</code> should have the following format and can only have 1 row.</p>
<table>
<thead>
<tr>
@ -1364,11 +1364,11 @@ a748ee1a-1d0b-4ae9-9074-279a2b6ba524;dsadas-2324-fgsf-sdwr-gdfgs4rfsdf43,p01,jul
<tbody>
<tr>
<td>label</td>
<td>A string that is used as a prefix in the name of your day segments</td>
<td>A string that is used as a prefix in the name of your time segments</td>
</tr>
<tr>
<td>length</td>
<td>An integer representing the duration of your day segments in minutes</td>
<td>An integer representing the duration of your time segments in minutes</td>
</tr>
</tbody>
</table>
@ -1377,7 +1377,7 @@ a748ee1a-1d0b-4ae9-9074-279a2b6ba524;dsadas-2324-fgsf-sdwr-gdfgs4rfsdf43,p01,jul
<div class="highlight"><pre><span></span><code>label,length
thirtyminutes,30
</code></pre></div>
<p>This configuration will compute 48 day segments for every day when any data from any participant was sensed. For example:</p>
<p>This configuration will compute 48 time segments for every day when any data from any participant was sensed. For example:</p>
<div class="highlight"><pre><span></span><code>start_time,length,label
00:00,30,thirtyminutes0000
00:30,30,thirtyminutes0001
@ -1389,13 +1389,13 @@ thirtyminutes,30
</div>
<input id="__tabbed_2_2" name="__tabbed_2" type="radio" /><label for="__tabbed_2_2">Periodic Segments</label><div class="tabbed-content">
<p>These segments can be computed every day, or on specific days of the week, month, quarter, and year. Their minimum duration is 1 minute but they can be as long as you want. Set the following keys in your <code>config.yaml</code>.</p>
<div class="highlight"><pre><span></span><code><span class="nt">DAY_SEGMENTS</span><span class="p">:</span> <span class="nl">&amp;day_segments</span>
<div class="highlight"><pre><span></span><code><span class="nt">TIME_SEGMENTS</span><span class="p">:</span> <span class="nl">&amp;time_segments</span>
<span class="nt">TYPE</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">PERIODIC</span>
<span class="nt">FILE</span><span class="p">:</span> <span class="s">&quot;data/external/your_periodic_segments.csv&quot;</span>
<span class="nt">INCLUDE_PAST_PERIODIC_SEGMENTS</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">FALSE</span> <span class="c1"># or TRUE</span>
</code></pre></div>
<p>If <code>[INCLUDE_PAST_PERIODIC_SEGMENTS]</code> is set to <code>TRUE</code>, RAPIDS will consider instances of your segments back enough in the past as to include the first row of data of each participant. For example, if the first row of data from a participant happened on Saturday March 7<sup>th</sup> 2020 and the requested segment duration is 7 days starting on every Sunday, the first segment to be considered would start on Sunday March 1<sup>st</sup> if <code>[INCLUDE_PAST_PERIODIC_SEGMENTS]</code> is <code>TRUE</code> or on Sunday March 8<sup>th</sup> if <code>FALSE</code>.</p>
<p>The file pointed by <code>[DAY_SEGMENTS][FILE]</code> should have the following format and can have multiple rows.</p>
<p>The file pointed by <code>[TIME_SEGMENTS][FILE]</code> should have the following format and can have multiple rows.</p>
<table>
<thead>
<tr>
@ -1406,7 +1406,7 @@ thirtyminutes,30
<tbody>
<tr>
<td>label</td>
<td>A string that is used as a prefix in the name of your day segments. It has to be <strong>unique</strong> between rows</td>
<td>A string that is used as a prefix in the name of your time segments. It has to be <strong>unique</strong> between rows</td>
</tr>
<tr>
<td>start_time</td>
@ -1440,12 +1440,12 @@ night,00:00:00,5H 59M 59S,every_day,0
</div>
<input id="__tabbed_2_3" name="__tabbed_2" type="radio" /><label for="__tabbed_2_3">Event segments</label><div class="tabbed-content">
<p>These segments can be computed before or after an event of interest (defined as any UNIX timestamp). Their minimum duration is 1 minute but they can be as long as you want. The start of each segment can be shifted backwards or forwards from the specified timestamp. Set the following keys in your <code>config.yaml</code>.</p>
<div class="highlight"><pre><span></span><code><span class="nt">DAY_SEGMENTS</span><span class="p">:</span> <span class="nl">&amp;day_segments</span>
<div class="highlight"><pre><span></span><code><span class="nt">TIME_SEGMENTS</span><span class="p">:</span> <span class="nl">&amp;time_segments</span>
<span class="nt">TYPE</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">EVENT</span>
<span class="nt">FILE</span><span class="p">:</span> <span class="s">&quot;data/external/your_event_segments.csv&quot;</span>
<span class="nt">INCLUDE_PAST_PERIODIC_SEGMENTS</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">FALSE</span> <span class="c1"># or TRUE</span>
</code></pre></div>
<p>The file pointed by <code>[DAY_SEGMENTS][FILE]</code> should have the following format and can have multiple rows.</p>
<p>The file pointed by <code>[TIME_SEGMENTS][FILE]</code> should have the following format and can have multiple rows.</p>
<table>
<thead>
<tr>
@ -1456,11 +1456,11 @@ night,00:00:00,5H 59M 59S,every_day,0
<tbody>
<tr>
<td>label</td>
<td>A string that is used as a prefix in the name of your day segments. If labels are unique, every segment is independent; if two or more segments have the same label, their data will be grouped when computing auxiliary data for features like the <code>most frequent contact</code> for calls (the most frequent contact will be computed across all these segments). There cannot be two <em>overlaping</em> event segments with the same label (RAPIDS will throw an error)</td>
<td>A string that is used as a prefix in the name of your time segments. If labels are unique, every segment is independent; if two or more segments have the same label, their data will be grouped when computing auxiliary data for features like the <code>most frequent contact</code> for calls (the most frequent contact will be computed across all these segments). There cannot be two <em>overlaping</em> event segments with the same label (RAPIDS will throw an error)</td>
</tr>
<tr>
<td>event_timestamp</td>
<td>A UNIX timestamp that represents the moment an event of interest happened (clinical relapse, survey, readmission, etc.). The corresponding day segment will be computed around this moment using <code>length</code>, <code>shift</code>, and <code>shift_direction</code></td>
<td>A UNIX timestamp that represents the moment an event of interest happened (clinical relapse, survey, readmission, etc.). The corresponding time segment will be computed around this moment using <code>length</code>, <code>shift</code>, and <code>shift_direction</code></td>
</tr>
<tr>
<td>length</td>
@ -1492,13 +1492,13 @@ mood,1587661220000,1H,0,0,a748ee1a-1d0b-4ae9-9074-279a2b6ba524
mood,1587747620000,1D,0,0,a748ee1a-1d0b-4ae9-9074-279a2b6ba524
mood,1587906020000,7D,0,0,a748ee1a-1d0b-4ae9-9074-279a2b6ba524
</code></pre></div>
<p>This example will create eight segments for a single participant (<code>a748ee1a...</code>), five independent <code>stressX</code> segments with various lengths (1,4,3,7, and 9 hours). Segments <code>stress1</code>, <code>stress3</code>, and <code>stress5</code> are shifted forwards by 5 minutes and <code>stress2</code> and <code>stress4</code> are shifted backwards by 4 hours (that is, if the <code>stress4</code> event happened on March 15<sup>th</sup> at 1pm EST (<code>1584291600000</code>), the day segment will start on that day at 9am and end at 4pm). </p>
<p>This example will create eight segments for a single participant (<code>a748ee1a...</code>), five independent <code>stressX</code> segments with various lengths (1,4,3,7, and 9 hours). Segments <code>stress1</code>, <code>stress3</code>, and <code>stress5</code> are shifted forwards by 5 minutes and <code>stress2</code> and <code>stress4</code> are shifted backwards by 4 hours (that is, if the <code>stress4</code> event happened on March 15<sup>th</sup> at 1pm EST (<code>1584291600000</code>), the time segment will start on that day at 9am and end at 4pm). </p>
<p>The three <code>mood</code> segments are 1 hour, 1 day and 7 days long and have no shift. In addition, these <code>mood</code> segments are grouped together, meaning that although RAPIDS will compute features on each one of them, some necessary information to compute a few of such features will be extracted from all three segments, for example the phone contact that called a participant the most or the location clusters visited by a participant.</p>
</div>
</div>
</div>
<h3 id="segment-examples">Segment Examples<a class="headerlink" href="#segment-examples" title="Permanent link">&para;</a></h3>
<div class="tabbed-set" data-tabs="3:6"><input checked="checked" id="__tabbed_3_1" name="__tabbed_3" type="radio" /><label for="__tabbed_3_1">5-minutes</label><div class="tabbed-content">
<div class="tabbed-set" data-tabs="3:7"><input checked="checked" id="__tabbed_3_1" name="__tabbed_3" type="radio" /><label for="__tabbed_3_1">5-minutes</label><div class="tabbed-content">
<p>Use the following <code>Frequency</code> segment file to create 288 (12 * 60 * 24) 5-minute segments starting from midnight of every day in your study
<div class="highlight"><pre><span></span><code>label,length
fiveminutes,5
@ -1511,12 +1511,18 @@ daily,00:00:00,23H 59M 59S,every_day,0
</code></pre></div></p>
</div>
<input id="__tabbed_3_3" name="__tabbed_3" type="radio" /><label for="__tabbed_3_3">Morning</label><div class="tabbed-content">
<p>Use the following <code>Periodic</code> segment file to create morning segments starting from 06:00 and ending at 12:00 of every day in your study
<p>Use the following <code>Periodic</code> segment file to create morning segments starting at 06:00:00 and ending at 11:59:59 of every day in your study
<div class="highlight"><pre><span></span><code>label,start_time,length,repeats_on,repeats_value
morning,00:00:00,5H 59M 59S,every_day,0
morning,06:00:00,5H 59M 59S,every_day,0
</code></pre></div></p>
</div>
<input id="__tabbed_3_4" name="__tabbed_3" type="radio" /><label for="__tabbed_3_4">Weekly</label><div class="tabbed-content">
<input id="__tabbed_3_4" name="__tabbed_3" type="radio" /><label for="__tabbed_3_4">Overnight</label><div class="tabbed-content">
<p>Use the following <code>Periodic</code> segment file to create overnight segments starting at 20:00:00 and ending at 07:59:59 (next day) of every day in your study
<div class="highlight"><pre><span></span><code>label,start_time,length,repeats_on,repeats_value
morning,20:00:00,11H 59M 59S,every_day,0
</code></pre></div></p>
</div>
<input id="__tabbed_3_5" name="__tabbed_3" type="radio" /><label for="__tabbed_3_5">Weekly</label><div class="tabbed-content">
<p>Use the following <code>Periodic</code> segment file to create <strong>non-overlapping</strong> weekly segments starting at midnight of every <strong>Monday</strong> in your study
<div class="highlight"><pre><span></span><code>label,start_time,length,repeats_on,repeats_value
weekly,00:00:00,6D 23H 59M 59S,wday,1
@ -1526,13 +1532,13 @@ Use the following <code>Periodic</code> segment file to create <strong>overlappi
weekly,00:00:00,6D 23H 59M 59S,every_day,0
</code></pre></div></p>
</div>
<input id="__tabbed_3_5" name="__tabbed_3" type="radio" /><label for="__tabbed_3_5">Week-ends</label><div class="tabbed-content">
<input id="__tabbed_3_6" name="__tabbed_3" type="radio" /><label for="__tabbed_3_6">Week-ends</label><div class="tabbed-content">
<p>Use the following <code>Periodic</code> segment file to create week-end segments starting at midnight of every <strong>Saturday</strong> in your study
<div class="highlight"><pre><span></span><code>label,start_time,length,repeats_on,repeats_value
weekend,00:00:00,1D 23H 59M 59S,wday,6
</code></pre></div></p>
</div>
<input id="__tabbed_3_6" name="__tabbed_3" type="radio" /><label for="__tabbed_3_6">Around surveys</label><div class="tabbed-content">
<input id="__tabbed_3_7" name="__tabbed_3" type="radio" /><label for="__tabbed_3_7">Around surveys</label><div class="tabbed-content">
<p>Use the following <code>Event</code> segment file to create two 2-hour segments that start 1 hour before surveys answered by 3 participants
<div class="highlight"><pre><span></span><code>label,event_timestamp,length,shift,shift_direction,device_id
survey1,1587661220000,2H,1H,-1,a748ee1a-1d0b-4ae9-9074-279a2b6ba524

View File

@ -922,8 +922,8 @@
</div>
<div class="admonition hint">
<p class="admonition-title">Deleting RAPIDS output</p>
<p>If you want to delete all the output files RAPIDS produces you can execute the following command (the content of these folders will be deleted: <code>data/raw</code>, <code>data/interim</code>, <code>data/processed</code>, <code>reports/figures</code>, and <code>reports/compliance</code>)</p>
<div class="highlight"><pre><span></span><code>./rapids -j1 -R clean
<p>If you want to delete all the output files RAPIDS produces you can execute the following command:</p>
<div class="highlight"><pre><span></span><code>./rapids -j1 --delete-all-output
</code></pre></div>
</div>

Binary file not shown.

View File

@ -910,7 +910,7 @@
<span class="nt">START_DATE</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">2020-01-01</span> <span class="c1"># this can also be empty</span>
<span class="nt">END_DATE</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">2021-01-01</span> <span class="c1"># this can also be empty</span>
</code></pre></div></p>
<p>4. <code>[DAY_SEGMENTS][TYPE]</code> should be the default <code>PERIODIC</code>. Change <code>[DAY_SEGMENTS][FILE]</code> with the path of a file containing the following lines:
<p>4. <code>[TIME_SEGMENTS][TYPE]</code> should be the default <code>PERIODIC</code>. Change <code>[TIME_SEGMENTS][FILE]</code> with the path of a file containing the following lines:
<div class="highlight"><pre><span></span><code>label,start_time,length,repeats_on,repeats_value
daily,00:00:00,23H 59M 59S,every_day,0
night,00:00:00,5H 59M 59S,every_day,0
@ -930,9 +930,9 @@ MY_GROUP
# ... other irrelevant sections
DAY_SEGMENTS: &amp;day_segments
TIME_SEGMENTS: &amp;time_segments
TYPE: PERIODIC
FILE: &quot;data/external/daysegments_periodic.csv&quot; # make sure the three lines specified above are in the file
FILE: &quot;data/external/timesegments_periodic.csv&quot; # make sure the three lines specified above are in the file
INCLUDE_PAST_PERIODIC_SEGMENTS: FALSE
# No need to change this if you collected AWARE data on a database and your credentials are grouped under `MY_GROUP` in `.env`
@ -967,7 +967,7 @@ PHONE_CALLS:
<div class="highlight"><pre><span></span><code>./rapids -j1
</code></pre></div></p>
</li>
<li>The call features for daily and morning day segments will be in
<li>The call features for daily and morning time segments will be in
<div class="highlight"><pre><span></span><code>/data/processed/features/p01/phone_calls.csv
</code></pre></div></li>
</ol>