Skip to content

Commit 1f3d22b

Browse files
committed
Moving on with method section.
1 parent 683259c commit 1f3d22b

File tree

4 files changed

+127
-196
lines changed

4 files changed

+127
-196
lines changed

_02_Material.qmd

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
In this work, the objective is to detect right and left heel strike and toe off events from hip orientation data over time. Knowledge of the occurences of these events is critical to compute key gait parameters such as the mean and the variability of stride duration, metrics of asymmetry or ratio stance/swing which have been proven to be clinically relevant [@annweiler2009risk;@beauchet2016poor]. We propose to address this problem by training, tuning and comparing several supervised classification models. In details, we consider the timepoints as the statistical units (observations) and we aim at training models to affect a *label* to each of them. This requires to elaborate a *labelled gait data* set in which we know which timepoints correspond to the occurence of the key gait events.
44

5-
For this purpose, we used two sources of data. First, we clipped a 9-axis inertial measurement unit (IMU) at the level of the right hip and measured its orientation (that we assimilate to the hip orientation) over time during walking sessions. The data is recorded in the form of a unit quaternion time series. @sec-quaternions provides a brief overview of unit quaternions and their properties. Second, we used a pressure-sensitive walkway (GAITRite® mat) as a gold standard to record the occurences of the gait events of interest. @sec-data-acquisition elicits the data acquisition protocol while @sec-data-sets summarizes the two collected data sets and the elaboration of the final labelled data set.
5+
For this purpose, we used two sources of data. First, we clipped a 9-axis inertial measurement unit (IMU) at the level of the right hip and measured its orientation (that we assimilate to the hip orientation) over time during walking sessions. The data is recorded in the form of a unit quaternion time series. @sec-quaternions provides a brief overview of unit quaternions and their properties. Second, we used a pressure-sensitive walkway (GAITRite® mat) as a gold standard to record the occurences of the gait events of interest. @sec-data-acquisition elicits the data acquisition protocol while @sec-imu-data and @sec-gaitrite-data summarize the two collected data sets and the elaboration of the final labelled data set.
66

77
## Unit quaternions {#sec-quaternions}
88

@@ -58,9 +58,10 @@ We included six subjects in this study (three men and three women) of different
5858
#| label: tbl-subjects
5959
#| tbl-cap: "Summary of subjects and walking speeds used to train the model."
6060
#| tbl-pos: "H"
61-
bhg <- readRDS(url(
62-
"https://zenodo.org/records/18222246/files/bellier_healthy_gait.rds?download=1"
63-
))
61+
# bhg <- readRDS(url(
62+
# "https://zenodo.org/records/18222246/files/bellier_healthy_gait.rds?download=1"
63+
# ))
64+
bhg <- readRDS("~/Downloads/bhg.rds")
6465
6566
bhg |>
6667
dplyr::group_by(subject, gender, age, condition) |>
@@ -76,6 +77,7 @@ bhg |>
7677
preferential = base,
7778
fast
7879
) |>
80+
dplyr::mutate_at(dplyr::vars(slow:fast), as.integer) |>
7981
gt::gt() |>
8082
gt::tab_spanner(
8183
label = "Walking speed (cm/s)",
@@ -84,12 +86,16 @@ bhg |>
8486
gt::cols_label(
8587
id = "ID",
8688
gender = "Gender",
87-
age = "Age range (years)",
89+
age = "Age range",
8890
slow = "Slow",
8991
intermediate = "Intermediate",
9092
preferential = "Preferential",
9193
fast = "Fast"
9294
) |>
95+
gt::cols_units(
96+
age ~ "years",
97+
.units_pattern = "{1} ({2})"
98+
) |>
9399
gt::sub_missing() |>
94100
gt_custom_theme()
95101
```
@@ -216,6 +222,7 @@ The part of the raw data from the GAITRite® walkway that we kept for labeling t
216222
#| tbl-pos: "H"
217223
bhg$gaitrite[[33]] |>
218224
dplyr::select(foot, first_contact, last_contact) |>
225+
dplyr::mutate(foot = as.integer(foot)) |>
219226
gt::gt() |>
220227
gt::cols_label(
221228
foot = "Foot",
@@ -451,6 +458,6 @@ df |>
451458
geom_line() +
452459
facet_wrap(vars(name), ncol = 1, scales = "free") +
453460
theme_bw() +
454-
labs(x = "Time (s)", y = "", color = "Event type") +
461+
labs(x = "Time (s)", y = "", color = "Events") +
455462
theme(legend.position = "top")
456463
```

0 commit comments

Comments
 (0)