This code extract Ethica data from raw CSV files.
This file reads Ethica files for each participant and different wear locations. Then it imputed the gaps of the accelerometer data, and finally, it binds them together to have a single dataset.
This code merge jaeger data with Ethica.
This code adds Age Height Weight and Gender to Ethica_jaeger_combined dataset.
This code reads labelled Ethica data. It selects data for the pocket location, calculates counts for each participant and creates a file for Weka. Also, it plots counts in X direction for all participants.
Explains how to prepare the Ethica data.
This file is an example of how to apply counts function. It create a dataframe with the same staring and end point as the data, with a frequency of 10 Hz. Fulljoin the two dataset , and impute NA by linear intrapolation.
This code plots accel data and color it based on the activity. Use this to check if the time adjustment is working.
This is the early version of a feature generator function used to produce various features, written by Fara. Depreciated
Use this file to create new features from raw accel data.
An example of how to increase the frequency from 10 to 30 Hz.
A crude attempt to investigate and tackle the issue we have with the participant's #132 data.
Participants 112, 121, 122, and 132 have a peculiar problem. The data seems normal, but when we join the data with a dataset that has all the timesteps from the beginning and the end of the study, they don't merge properly. As a result, after calculating the counts, labelling is distorted. This is shown in the graph produced by the "5_Create_pocket_Counts_Weka_data.R" file.
This file plots counts calculted by the library "activityCounts" for each participant.
This code creates a model which can be used to adjust the timestamps.
This file contains different models such as LDA, KNN, RF, SVM, etc.
- Model A uses Raw accel data and ignores metadata.
- No CV is used. Split 75% to 25% train and test, or 66% and 33%.
- No parameter tuning is used.
This file has many many models, and some of them might not work. Use this file to test the models and choose between different model providing an algorithm. This is a draft file.
This file is similar to "5_Create_pocket_Counts_Weka_data.R" This code reads labelled Ethica data. It selects data for the pocket location, calculates counts for each participant and creates a file for Weka. Also, it plots counts in X direction for all participants
As there are missing observations for various timestamps in the raw data, different imputation methods are used before applying the Count function.
This file compares them and suggest a new method for imputation, which seems to the best.
This is an unfinished attempt to do all the data processing from the beginning and prepare the data. This is similar to "Sync_Ethica_jaeger_with40hz_timingfile.Rmd" file.
This is similar to "Sync_Ethica_jaeger.Rmd" file, Its main steps are:
- Read Ethica raw data
- Focus on one participant e.g. 108
- From Jaeger folder read timing and extract start and end time
- Loops 10 times and each time
- Alter record time, and change the frequency
- Create a longer dataframe and join it with timing.csv
- join the result and Ethica
- Implement a model and calculate store accuracy
- print the highest accuracy and the time period added to the Ethica
As a part of the data preparation process, we need to investigate if have a freq of 30 and a repeated copy of that dataset, which has a pseudo frequency of 90Hz, are actually producing the same counts.
This file is an explanation for the data cleaning and extracting process. To extract the data, read the readme file and do not run this code.
This file explains the data cleaning and extracting process. The steps that we need to take to prepare the data are
A list of all the files inside the main folder and the subfolders, and their functionality.