rapids/docs/features/feature-introduction.md

58 lines
3.9 KiB
Markdown
Raw Normal View History

# Behavioral Features Introduction
2020-11-06 23:17:41 +01:00
Every phone or Fitbit sensor has a corresponding config section in `config.yaml`, these sections follow a similar structure and we'll use `PHONE_ACCELEROMETER` as an example to explain this structure.
2020-11-06 23:17:41 +01:00
!!! hint
- We recommend reading this page if you are using RAPIDS for the first time
- All computed sensor features are stored under `/data/processed/features` on files per sensor, per participant and per study (all participants).
- Every time you change any sensor parameters, provider parameters or provider features, all the necessary files will be updated as soon as you execute RAPIDS.
2020-11-06 23:17:41 +01:00
2020-11-26 00:24:43 +01:00
2020-11-06 23:17:41 +01:00
!!! example "Config section example for `PHONE_ACCELEROMETER`"
```yaml
2020-11-06 23:17:41 +01:00
# 1) Config section
PHONE_ACCELEROMETER:
# 2) Parameters for PHONE_ACCELEROMETER
TABLE: accelerometer
# 3) Providers for PHONE_ACCELEROMETER
PROVIDERS:
2020-11-06 23:17:41 +01:00
# 4) RAPIDS provider
RAPIDS:
2020-11-06 23:17:41 +01:00
# 4.1) Parameters of RAPIDS provider of PHONE_ACCELEROMETER
COMPUTE: False
# 4.2) Features of RAPIDS provider of PHONE_ACCELEROMETER
FEATURES: ["maxmagnitude", "minmagnitude", "avgmagnitude", "medianmagnitude", "stdmagnitude"]
SRC_FOLDER: "rapids" # inside src/features/phone_accelerometer
SRC_LANGUAGE: "python"
# 5) PANDA provider
PANDA:
2020-11-18 18:33:26 +01:00
# 5.1) Parameters of PANDA provider of PHONE_ACCELEROMETER
2020-11-06 23:17:41 +01:00
COMPUTE: False
VALID_SENSED_MINUTES: False
2020-11-18 18:33:26 +01:00
# 5.2) Features of PANDA provider of PHONE_ACCELEROMETER
2020-11-06 23:17:41 +01:00
FEATURES:
exertional_activity_episode: ["sumduration", "maxduration", "minduration", "avgduration", "medianduration", "stdduration"]
nonexertional_activity_episode: ["sumduration", "maxduration", "minduration", "avgduration", "medianduration", "stdduration"]
SRC_FOLDER: "panda" # inside src/features/phone_accelerometer
SRC_LANGUAGE: "python"
```
2020-11-06 23:17:41 +01:00
## Sensor Parameters
2020-11-26 00:24:43 +01:00
Each sensor configuration section has a "parameters" subsection (see `#2` in the example). These are parameters that affect different aspects of how the raw data is downloaded, and processed. The `TABLE` parameter exists for every sensor, but some sensors will have extra parameters like [`[PHONE_LOCATIONS]`](../phone-locations/). We explain these parameters in a table at the top of each sensor documentation page.
2020-11-06 23:17:41 +01:00
## Sensor Providers
2020-11-18 18:33:26 +01:00
Each sensor configuration section can have zero, one or more behavioral feature **providers** (see `#3` in the example). A provider is a script created by the core RAPIDS team or other researchers that extracts behavioral features for that sensor. In this example, accelerometer has two providers: RAPIDS (see `#4`) and PANDA (see `#5`).
2020-11-06 23:17:41 +01:00
### Provider Parameters
Each provider has parameters that affect the computation of the behavioral features it offers (see `#4.1` or `#5.1` in the example). These parameters will include at least a `[COMPUTE]` flag that you switch to `True` to extract a provider's behavioral features.
2020-11-18 18:33:26 +01:00
We explain every provider's parameter in a table under the `Parameters description` heading on each provider documentation page.
2020-11-06 23:17:41 +01:00
### Provider Features
2020-11-26 00:24:43 +01:00
Each provider offers a set of behavioral features (see `#4.2` or `#5.2` in the example). For some providers these features are grouped in an array (like those for `RAPIDS` provider in `#4.2`) but for others they are grouped in a collection of arrays depending on the meaning and purpose of those features (like those for `PANDAS` provider in `#5.2`). In either case, you can delete the features you are not interested in and they will not be included in the sensor's output feature file.
2020-11-06 23:17:41 +01:00
We explain each behavioral feature in a table under the `Features description` heading on each provider documentation page.