-
Notifications
You must be signed in to change notification settings - Fork 6
/
example.yaml
51 lines (50 loc) · 1.87 KB
/
example.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
modules:
- tasrif.processing_pipeline: [sequence, compose, map_iterable, print]
- tasrif.data_readers.fitbit_interday_dataset: [fitbit_interday_dataset]
- tasrif.processing_pipeline.pandas: [convert_to_datetime, set_index, merge, as_type, drop_features]
- tasrif.processing_pipeline.custom: [create_feature, aggregate, flatten, normalize]
pipeline:
$sequence:
- $compose:
- $sequence:
- $fitbit_interday_dataset:
folder_path: ${FITBIT_INTERDAY_PATH}
table_name: Activities
- $convert_to_datetime:
feature_names: Date
infer_datetime_format: true
- $as_type:
dtype:
Date: str
- $drop_features:
feature_names: [Floors, Activity Calories, Minutes Lightly Active, Minutes Fairly Active, Minutes Very Active]
- $set_index:
keys: Date
- $sequence:
- $fitbit_interday_dataset:
folder_path: ${FITBIT_INTERDAY_PATH}
table_name: Sleep
- $convert_to_datetime:
feature_names: [Start Time, End Time]
infer_datetime_format: true
- $create_feature:
feature_name: Date
feature_creator: lambda df:df['End Time'].dt.date
- $drop_features:
feature_names: ['Minutes Awake', 'Number of Awakenings', 'Time in Bed', 'Minutes REM Sleep', 'Minutes Light Sleep', 'Minutes Deep Sleep']
- $aggregate:
groupby_feature_names: Date
aggregation_definition:
Minutes Asleep: sum
- $as_type:
dtype:
Date: str
- $set_index:
keys: Date
- $flatten
- $merge:
'on': Date
how: inner
- $create_feature:
feature_name: Minutes Non Sedentary
feature_creator: "lambda df: 1440 - df['Minutes Sedentary'] - df['Minutes Asleep_sum']"