Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
library(mhealthtools)
head(mhealthtools::accelerometer_data)
cleaned_sensor_data <- mhealthtools:::preprocess_sensor_data(
mhealthtools::accelerometer_data,
window_length = 256,
sampling_rate = 100,
frequency_range = c(1,25),
time_range = c(1,9))
cleaned_sensor_data
transformation <- transformation_window(
window_length = 256,
overlap = 0.5)
transformed_sensor_data <- transormation(cleaned_sensor_data)
transformed_sensor_data
thing <- get_tremor_features(
accelerometer_data = mhealthtools::accelerometer_data,
gyroscope_data = mhealthtools::gyroscope_data,
gravity_data = mhealthtools::gravity_data,
funs = mhealthtools:::default_kinematic_features(sampling_rate = 100),
models = list(test_model = function(sensor_data) {
dplyr::tibble(
measurementType = c("acceleration", "velocity", "displacement"),
value = purrr::map_dbl(sensor_data[,c("acceleration", "velocity", "displacement")], sum))
}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.