A package that transform intermediate log files into features of interest for analysis
Project description
Introduction
This repository include Python scripts that transform raw sensor data collected from Android mobile devices into features of interest for analysis.
Current research topic: identify contextual prompt-level factors that predict response or no response in microEMA.
Statistical methodology: multi-level modeling
Outcomes: compliance rate
Predictors:
-
Within-person or prompt level:
- time of the day
- day of the week
- day in study
- activity level
- battery level
- location
-
Between-person or person level
- age
- gender
- study mode
Exploratory Discussions on Factors
Detailed discussions on factors can be found here.
Features Overview
Smartphone
Outcome | Level | Effect Type | Variable Type | Data Source |
---|---|---|---|---|
Compliance Rate | Level 1 (Within-person or prompt level) | Random | Numeric | ./logs-watch/PromptResponses.log.csv |
Level 2 (Between-person or person level) | Random |
Feature | Level | Effect Type | Variable Type | Data Source |
---|---|---|---|---|
Day of the Week | Level 1 (Within-person or prompt level) | Random | Categorical (Mon-Sat: 0-6) | ./logs-watch/.../PromptResponses.log.csv |
Time of the Day | Level 1 (Within-person or prompt level) | Random | Categorical (morning, afternoon, evening/night) | ./logs-watch/.../PromptResponses.log.csv |
Days in Study | Level 1 (Within-person or prompt level) | Random | Numeric (numeric value of day from the first day) | ./logs-watch (start from the first date of created folder) |
Battery Level | Level 1 (Within-person or prompt level) | Random | Numeric (Battery%) | ./data-watch/.../Battery.##.event.csv |
Location (LOC) | Level 1 (Within-person or prompt level) | Random | ||
Activity Level (ACT) | Level 1 (Within-person or prompt level) | Random |
Smartwatch
Outcome | Level | Effect Type | Variable Type | Data Source |
---|---|---|---|---|
Compliance Rate | Level 1 (Within-person or prompt level) | Random | Numeric | ./logs-watch/PromptResponses.log.csv |
Level 2 (Between-person or person level) | Random |
Feature | Level | Effect Type | Variable Type | Data Source |
---|---|---|---|---|
Day of the Week | Level 1 (Within-person or prompt level) | Random | Categorical (Mon-Sat: 0-6) | ./logs-watch/.../PromptResponses.log.csv |
Time of the Day | Level 1 (Within-person or prompt level) | Random | Categorical (morning, afternoon, evening/night) | ./logs-watch/.../PromptResponses.log.csv |
Days in Study | Level 1 (Within-person or prompt level) | Random | Numeric (numeric value of day from the first day) | ./logs-watch (start from the first date of created folder) |
Battery Level | Level 1 (Within-person or prompt level) | Random | Numeric (Battery%) | ./data-watch/.../Battery.##.event.csv |
Location (LOC) | Level 1 (Within-person or prompt level) | Random | ||
Activity Level (ACT) | Level 1 (Within-person or prompt level) | Random |
Code Usage for Feature Matrix Generation
#!python
python main.py [intermediate_root_path] [feature_save_path] [participants_included_text_file_path] start_date end_date
e.g., python main.py E:\ E:\ C:\Users\jixin\Documents\GitHub\microt_compliance\analysis_task\watch_participants_included.txt 2020-01-01 2020-08-01
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for microt_compliance-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03f2812ea52184ebeefa08191d004e21c7569d1a5bdcbf6ebac1643edc199209 |
|
MD5 | b631ffea9a9d24d6978881e9b83fc98c |
|
BLAKE2b-256 | f77b72cab200d04b03fd726cd9d8207bbbfb2f5d86a5b23b9046913f56ab7f0f |