test(notebooks): update file paths for sensor data loading and add markdown for clarity

This commit is contained in:
nuluh
2025-04-21 00:07:06 +07:00
parent 804c178175
commit cb380219f9

View File

@@ -324,9 +324,9 @@
"import pandas as pd\n", "import pandas as pd\n",
"import matplotlib.pyplot as plt\n", "import matplotlib.pyplot as plt\n",
"ready_data1 = []\n", "ready_data1 = []\n",
"for file in os.listdir('D:/thesis/data/working/sensor1'):\n", "for file in os.listdir('D:/thesis/data/converted/raw/sensor1'):\n",
" ready_data1.append(pd.read_csv(os.path.join('D:/thesis/data/working/sensor1', file)))\n", " ready_data1.append(pd.read_csv(os.path.join('D:/thesis/data/converted/raw/sensor1', file)))\n",
"# ready_data1[1]\n", "ready_data1[0]\n",
"# colormesh give title x is frequency and y is time and rotate/transpose the data\n", "# colormesh give title x is frequency and y is time and rotate/transpose the data\n",
"# Plotting the STFT Data" "# Plotting the STFT Data"
] ]
@@ -362,8 +362,8 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"ready_data2 = []\n", "ready_data2 = []\n",
"for file in os.listdir('D:/thesis/data/working/sensor2'):\n", "for file in os.listdir('D:/thesis/data/converted/raw/sensor2'):\n",
" ready_data2.append(pd.read_csv(os.path.join('D:/thesis/data/working/sensor2', file)))\n", " ready_data2.append(pd.read_csv(os.path.join('D:/thesis/data/converted/raw/sensor2', file)))\n",
"ready_data2[5]" "ready_data2[5]"
] ]
}, },
@@ -407,6 +407,13 @@
"print(x2)" "print(x2)"
] ]
}, },
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Appending"
]
},
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
@@ -448,15 +455,10 @@
] ]
}, },
{ {
"cell_type": "code", "cell_type": "markdown",
"execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [],
"source": [ "source": [
"y_1 = [1,1,1,1]\n", "### Labeling"
"y_2 = [0,1,1,1]\n",
"y_3 = [1,0,1,1]\n",
"y_4 = [1,1,0,0]"
] ]
}, },
{ {
@@ -492,6 +494,16 @@
" print(ready_data1[i].shape[0])" " print(ready_data1[i].shape[0])"
] ]
}, },
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"for i in range(len(y_data)):\n",
" print(ready_data2[i].shape[0])"
]
},
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
@@ -509,7 +521,8 @@
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"y_data" "# len(y_data[0])\n",
"y_data[0]"
] ]
}, },
{ {