Skip to content

Commit 18e2dfa

Browse files
committed
Adding important comments
1 parent 36fc697 commit 18e2dfa

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Notebooks/emg.ipynb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 25,
5+
"execution_count": null,
66
"metadata": {},
77
"outputs": [
88
{
@@ -119,9 +119,9 @@
119119
" Root Mean Square (RMS), and Waveform Length (WL).\n",
120120
" \"\"\"\n",
121121
" features = {\n",
122-
" 'mean_absolute_value': np.mean(np.abs(segment)), # MAV : signal strength\n",
123-
" 'root_mean_square': np.sqrt(np.mean(segment**2)), # RMS: provides insight into signal energy\n",
124-
" 'waveform_length': np.sum(np.abs(np.diff(segment))), # WL: measures the signal's variation\n",
122+
" 'mean_absolute_value': np.mean(np.abs(segment)), # reflecting muscle contraction intensity\n",
123+
" 'root_mean_square': np.sqrt(np.mean(segment**2)), # indicating muscle force.\n",
124+
" 'waveform_length': np.sum(np.abs(np.diff(segment))), # providing insights of muscle activity duration & intensity.\n",
125125
" }\n",
126126
" return features\n",
127127
"\n",
@@ -140,6 +140,7 @@
140140
" Calculates the Zero Crossing Rate, which is useful to measure signal complexity.\n",
141141
" \"\"\"\n",
142142
" return np.sum(np.diff(np.sign(segment)) != 0) / len(segment) # Measures the number of times the signal crosses zero\n",
143+
" # Which indicates signal smoothness and contraction consistency.\n",
143144
"\n",
144145
"def autocorrelation(segment):\n",
145146
" \"\"\"\n",

0 commit comments

Comments
 (0)