diff --git a/README.md b/README.md
index ef9fa98..f38b3c5 100644
--- a/README.md
+++ b/README.md
@@ -179,11 +179,13 @@ With those Classifiers, the hypothesis can be proven, that a classifier is able
The significant appearance of sinus bradycardia in the age group 60-70 could be caused by multiple factors.
In this case the physiological age could play a huge factor. The sinus node continuously generates electrical impulses, thus setting the normal rhythm and rate in a healthy heart. With increasing age, the sinus node becomes less responsive which leads to a slower heart rate of 60 bpm or less.
Another reason could be increased medication, which is more likely to be the case when older. A sinus bradycardia could appear as a side effect of that medication.
+
(source: https://doi.org/10.1253/jcj.57.760, last visit: 10.06.2024)
+
(source: https://doi.org/10.7861%2Fclinmed.2022-0431, last visit: 10.06.2024)
But what could be the reason for the more frequent appearance of the sinus bradycardia in the age group 60-70 than in other older age groups?
The lower number of sinus bradycardia cases in older age groups could be due to the increasing mortality with higher ages. People with sinus bradycardia might not reach older ages because of comorbidities and further complications.
- Besides that, older people are more likely to receive medical support such as medication and pacemakers which will prevent sinus bradycardia or at least lower its effect.
+ Besides that, older people are more likely to receive medical support such as medication and pacemakers which can prevent sinus bradycardia or at least lower its effect.
The sample size in the study conducted may also play a role in the significance of the frequency.
## Contributing
diff --git a/notebooks/qrs_filter.ipynb b/notebooks/qrs_filter.ipynb
index 30cb3e9..2c3a126 100644
--- a/notebooks/qrs_filter.ipynb
+++ b/notebooks/qrs_filter.ipynb
@@ -11,7 +11,7 @@
},
{
"cell_type": "code",
- "execution_count": 1,
+ "execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
@@ -38,22 +38,22 @@
},
{
"cell_type": "code",
- "execution_count": 2,
+ "execution_count": 18,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "Reading SB\n",
- "Reading AFIB\n",
"Reading GSVT\n",
+ "Reading AFIB\n",
"Reading SR\n",
+ "Reading SB\n",
"Number of patients per category:\n",
- "SB: 16559\n",
- "AFIB: 9839\n",
"GSVT: 948\n",
- "SR: 9720\n"
+ "AFIB: 9839\n",
+ "SR: 9720\n",
+ "SB: 16559\n"
]
}
],
@@ -74,7 +74,7 @@
},
{
"cell_type": "code",
- "execution_count": 3,
+ "execution_count": 19,
"metadata": {},
"outputs": [],
"source": [
@@ -87,15 +87,15 @@
},
{
"cell_type": "code",
- "execution_count": 4,
+ "execution_count": 20,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "CPU times: total: 562 ms\n",
- "Wall time: 1.46 s\n"
+ "CPU times: total: 1.41 s\n",
+ "Wall time: 5.67 s\n"
]
}
],
@@ -115,15 +115,15 @@
},
{
"cell_type": "code",
- "execution_count": 5,
+ "execution_count": 21,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "CPU times: total: 375 ms\n",
- "Wall time: 1.77 s\n"
+ "CPU times: total: 2.77 s\n",
+ "Wall time: 9.85 s\n"
]
}
],
@@ -137,15 +137,15 @@
},
{
"cell_type": "code",
- "execution_count": 6,
+ "execution_count": 22,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "CPU times: total: 547 ms\n",
- "Wall time: 1.8 s\n"
+ "CPU times: total: 1.95 s\n",
+ "Wall time: 7.01 s\n"
]
}
],
@@ -157,15 +157,15 @@
},
{
"cell_type": "code",
- "execution_count": 7,
+ "execution_count": 23,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "CPU times: total: 391 ms\n",
- "Wall time: 1.72 s\n"
+ "CPU times: total: 1.97 s\n",
+ "Wall time: 8.91 s\n"
]
}
],
@@ -186,7 +186,7 @@
},
{
"cell_type": "code",
- "execution_count": 8,
+ "execution_count": 24,
"metadata": {},
"outputs": [],
"source": [
@@ -204,7 +204,7 @@
},
{
"cell_type": "code",
- "execution_count": 9,
+ "execution_count": 25,
"metadata": {},
"outputs": [],
"source": [
@@ -217,7 +217,7 @@
},
{
"cell_type": "code",
- "execution_count": 10,
+ "execution_count": 26,
"metadata": {},
"outputs": [],
"source": [
@@ -239,7 +239,7 @@
},
{
"cell_type": "code",
- "execution_count": 11,
+ "execution_count": 27,
"metadata": {},
"outputs": [
{
@@ -266,7 +266,7 @@
},
{
"cell_type": "code",
- "execution_count": 16,
+ "execution_count": 28,
"metadata": {},
"outputs": [],
"source": [
@@ -294,14 +294,14 @@
},
{
"cell_type": "code",
- "execution_count": 17,
+ "execution_count": 29,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "sb_p 854 sb_t 854 sb_clean 854\n"
+ "sb_p 863 sb_t 863 sb_clean 863\n"
]
}
],
@@ -321,9 +321,22 @@
},
{
"cell_type": "code",
- "execution_count": 20,
+ "execution_count": 30,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "ename": "TypeError",
+ "evalue": "slice indices must be integers or None or have an __index__ method",
+ "output_type": "error",
+ "traceback": [
+ "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
+ "\u001b[1;31mTypeError\u001b[0m Traceback (most recent call last)",
+ "Cell \u001b[1;32mIn[30], line 5\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mcut_signals\u001b[39m(signals,first_p,first_t):\n\u001b[0;32m 2\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m [signals[i][first_p[i]:first_t[i]] \u001b[38;5;28;01mfor\u001b[39;00m i \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mrange\u001b[39m(\u001b[38;5;28mlen\u001b[39m(signals))]\n\u001b[1;32m----> 5\u001b[0m sliced_sb \u001b[38;5;241m=\u001b[39m \u001b[43mcut_signals\u001b[49m\u001b[43m(\u001b[49m\u001b[43mclean_sb\u001b[49m\u001b[43m,\u001b[49m\u001b[43mfirst_sb_p_peak\u001b[49m\u001b[43m,\u001b[49m\u001b[43mfirst_sb_t_peak\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 6\u001b[0m sliced_afib \u001b[38;5;241m=\u001b[39m cut_signals(clean_afib,first_afib_p_peak,first_afib_t_peak)\n\u001b[0;32m 7\u001b[0m sliced_sr \u001b[38;5;241m=\u001b[39m cut_signals(clean_sr,first_sr_p_peak,first_sr_t_peak)\n",
+ "Cell \u001b[1;32mIn[30], line 2\u001b[0m, in \u001b[0;36mcut_signals\u001b[1;34m(signals, first_p, first_t)\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mcut_signals\u001b[39m(signals,first_p,first_t):\n\u001b[1;32m----> 2\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m [\u001b[43msignals\u001b[49m\u001b[43m[\u001b[49m\u001b[43mi\u001b[49m\u001b[43m]\u001b[49m\u001b[43m[\u001b[49m\u001b[43mfirst_p\u001b[49m\u001b[43m[\u001b[49m\u001b[43mi\u001b[49m\u001b[43m]\u001b[49m\u001b[43m:\u001b[49m\u001b[43mfirst_t\u001b[49m\u001b[43m[\u001b[49m\u001b[43mi\u001b[49m\u001b[43m]\u001b[49m\u001b[43m]\u001b[49m \u001b[38;5;28;01mfor\u001b[39;00m i \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mrange\u001b[39m(\u001b[38;5;28mlen\u001b[39m(signals))]\n",
+ "\u001b[1;31mTypeError\u001b[0m: slice indices must be integers or None or have an __index__ method"
+ ]
+ }
+ ],
"source": [
"def cut_signals(signals,first_p,first_t):\n",
" return [signals[i][first_p[i]:first_t[i]] for i in range(len(signals))]\n",
@@ -333,6 +346,15 @@
"sliced_afib = cut_signals(clean_afib,first_afib_p_peak,first_afib_t_peak)\n",
"sliced_sr = cut_signals(clean_sr,first_sr_p_peak,first_sr_t_peak)"
]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "np.mean(sliced_sb,axis=1)"
+ ]
}
],
"metadata": {