wadpac / movement-sequence-mapping

Code base for deriving movement sequences from accelerometer (Actigraph) data and mapping them to symbolic classes, as originally described in: https://doi.org/10.1249/mss.0000000000001849
Apache License 2.0
1 stars 0 forks source link

Function renaming #8

Closed vincentvanhees closed 3 months ago

vincentvanhees commented 3 years ago

I keep finding it difficult to navigate the code in this repo as function names are often not clear.

For example, the terminology short and long map is confusing, they structure data per day or per recording. So, I think it is more intuitive to refer to day or recording level structuring.

Current function dependencies and what each function does:

Proposed revision of function names:

Old name Proposed new name
generate_sequence_maps main_script
sequence_mapping_main_last run_pipeline
readdata read_file
aggAccFile_self resample
tsFromEpoch_self reformat_time_indicator
bouts_length_filter generate_sequence
labelNonWear detect_nonwear
tolerated_bouts detect_bouts
tolerance xinhui_bout_algorithm
generate_sequence_map add_symbols
shorting.map structure_per_day
long.map structure_per_recording
vincentvanhees commented 3 years ago

Further I think argument "tolerance_function" should be replaced bout_algorithm.

Detecting bouts and using a certain tolerance is effectively part of the same algorithm. We currently have bout_algorithm V1 (Xinhui) and V2 (mine).

vincentvanhees commented 3 years ago

@Anne-Linde let's discuss this next week, before we start implementing any of this.

Anne-Linde commented 2 years ago

renamed function generate_sequence_map to add_symbols instead of add_class_labels. I find class labels confusing: I take that as intensity classes

Anne-Linde commented 2 years ago

Renamed list items

In function Old name Proposed new name
run_pipeline short_sequence sequence_day_level
run_pipeline long_sequence sequence_recording_level
generate_sequence short_mapping day_level_mapping
generate_sequence long_mapping recording_level_mapping
generate_sequence short_mapping_length day_level_mapping_length
generate_sequence long_mapping_length recording_level_mapping_length

Renamed function arguments

In function Old name Proposed new name
structure_per_recording short_mapping day_level_mapping
structure_per_recording short_mapping day_level_map
structure_per_day short_mapping day_level_mapping

Renamed variable names

In function Old name Proposed new name
run_pipeline & generate_sequence short_mapping day_level_mapping
run_pipeline & generate_sequence long_mapping recording_level_mapping
run_pipeline & generate_sequence short_mapping_length day_level_mapping_length
run_pipeline & generate_sequence long_mapping_length recording_level_mapping_length
generate_sequence map_per_day map_loop_day
main.script.R sm_short sm_day_level
main.script.R sm_long sm_recording_level