iui-group-l-name-zensiert/2-second-project/tdt/DataViz.ipynb

1867 lines
84 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "a33b4ae2",
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"\n",
"os.environ['TF_FORCE_GPU_ALLOW_GROWTH'] = 'true' # this is required\n",
"os.environ['CUDA_VISIBLE_DEVICES'] = '1' # set to '0' for GPU0, '1' for GPU1 or '2' for GPU2. Check \"gpustat\" in a terminal."
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "bfcb55c8",
"metadata": {},
"outputs": [],
"source": [
"glob_path = '/opt/iui-datarelease3-sose2021/*.csv'\n",
"\n",
"pickle_file = '../data.pickle'"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "7bb04d71",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"from glob import glob\n",
"import pandas as pd\n",
"from tqdm import tqdm\n",
"\n",
"def dl_from_blob(filename, user_filter=None):\n",
" \n",
" dic_data = []\n",
" \n",
" for p in tqdm(glob(glob_path)):\n",
" path = p\n",
" filename = path.split('/')[-1].split('.')[0]\n",
" splitname = filename.split('_')\n",
" user = int(splitname[0][1:])\n",
" if (user_filter):\n",
" if (user != user_filter):\n",
" continue\n",
" scenario = splitname[1][len('Scenario'):]\n",
" heightnorm = splitname[2][len('HeightNormalization'):] == 'True'\n",
" armnorm = splitname[3][len('ArmNormalization'):] == 'True'\n",
" rep = int(splitname[4][len('Repetition'):])\n",
" session = int(splitname[5][len('Session'):])\n",
" data = pd.read_csv(path)\n",
" dic_data.append(\n",
" {\n",
" 'filename': path,\n",
" 'user': user,\n",
" 'scenario': scenario,\n",
" 'heightnorm': heightnorm,\n",
" 'armnorm': armnorm,\n",
" 'rep': rep,\n",
" 'session': session,\n",
" 'data': data \n",
" }\n",
" )\n",
" return dic_data"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "9adc333e",
"metadata": {},
"outputs": [],
"source": [
"import pickle\n",
"\n",
"def save_pickle(f, structure):\n",
" _p = open(f, 'wb')\n",
" pickle.dump(structure, _p)\n",
" _p.close()"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "dfc32785",
"metadata": {},
"outputs": [],
"source": [
"def load_pickles(f) -> list:\n",
" _p = open(pickle_file, 'rb')\n",
" _d = pickle.load(_p)\n",
" _p.close()\n",
" \n",
" return _d"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "09a66223",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Loading data...\n",
"../data.pickle found...\n",
"CPU times: user 512 ms, sys: 2.47 s, total: 2.98 s\n",
"Wall time: 2.98 s\n"
]
}
],
"source": [
"%%time\n",
"\n",
"\n",
"def load_data() -> list:\n",
" if os.path.isfile(pickle_file):\n",
" print(f'{pickle_file} found...')\n",
" return load_pickles(pickle_file)\n",
" print(f'Didn\\'t find {pickle_file}...')\n",
" all_data = dl_from_blob(glob_path)\n",
" print(f'Creating {pickle_file}...')\n",
" save_pickle(pickle_file, all_data)\n",
" return all_data\n",
"\n",
"print(\"Loading data...\")\n",
"dic_data = load_data()\n",
"# plot_pd(data[0]['data'], False)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "07df007d",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"192\n"
]
},
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Unnamed: 0</th>\n",
" <th>FrameID</th>\n",
" <th>participantID</th>\n",
" <th>Scenario</th>\n",
" <th>HeightNormalization</th>\n",
" <th>ArmNormalization</th>\n",
" <th>Repetition</th>\n",
" <th>LeftHandTrackingAccuracy</th>\n",
" <th>RightHandTrackingAccuracy</th>\n",
" <th>CenterEyeAnchor_pos_X</th>\n",
" <th>...</th>\n",
" <th>right_Hand_RingTip_euler_X</th>\n",
" <th>right_Hand_RingTip_euler_Y</th>\n",
" <th>right_Hand_RingTip_euler_Z</th>\n",
" <th>right_Hand_PinkyTip_pos_X</th>\n",
" <th>right_Hand_PinkyTip_pos_Y</th>\n",
" <th>right_Hand_PinkyTip_pos_Z</th>\n",
" <th>right_Hand_PinkyTip_euler_X</th>\n",
" <th>right_Hand_PinkyTip_euler_Y</th>\n",
" <th>right_Hand_PinkyTip_euler_Z</th>\n",
" <th>Session</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>7</td>\n",
" <td>SortingBlocksScene</td>\n",
" <td>True</td>\n",
" <td>True</td>\n",
" <td>1</td>\n",
" <td>High</td>\n",
" <td>High</td>\n",
" <td>-0.089895</td>\n",
" <td>...</td>\n",
" <td>307.9409</td>\n",
" <td>320.01970</td>\n",
" <td>195.1051</td>\n",
" <td>0.016631</td>\n",
" <td>1.106319</td>\n",
" <td>0.430588</td>\n",
" <td>310.8786</td>\n",
" <td>343.57170</td>\n",
" <td>185.1874</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>7</td>\n",
" <td>SortingBlocksScene</td>\n",
" <td>True</td>\n",
" <td>True</td>\n",
" <td>1</td>\n",
" <td>High</td>\n",
" <td>High</td>\n",
" <td>-0.089738</td>\n",
" <td>...</td>\n",
" <td>308.1140</td>\n",
" <td>320.34520</td>\n",
" <td>195.5152</td>\n",
" <td>0.007256</td>\n",
" <td>1.145476</td>\n",
" <td>0.423464</td>\n",
" <td>311.1056</td>\n",
" <td>343.74560</td>\n",
" <td>185.6717</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>7</td>\n",
" <td>SortingBlocksScene</td>\n",
" <td>True</td>\n",
" <td>True</td>\n",
" <td>1</td>\n",
" <td>High</td>\n",
" <td>High</td>\n",
" <td>-0.089347</td>\n",
" <td>...</td>\n",
" <td>308.2395</td>\n",
" <td>320.51180</td>\n",
" <td>195.7206</td>\n",
" <td>0.007426</td>\n",
" <td>1.144992</td>\n",
" <td>0.423223</td>\n",
" <td>311.2307</td>\n",
" <td>343.79710</td>\n",
" <td>185.9125</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>7</td>\n",
" <td>SortingBlocksScene</td>\n",
" <td>True</td>\n",
" <td>True</td>\n",
" <td>1</td>\n",
" <td>High</td>\n",
" <td>High</td>\n",
" <td>-0.088938</td>\n",
" <td>...</td>\n",
" <td>308.3445</td>\n",
" <td>320.66750</td>\n",
" <td>195.9804</td>\n",
" <td>0.007635</td>\n",
" <td>1.144509</td>\n",
" <td>0.423137</td>\n",
" <td>311.3370</td>\n",
" <td>343.84570</td>\n",
" <td>186.1985</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>4</td>\n",
" <td>4</td>\n",
" <td>7</td>\n",
" <td>SortingBlocksScene</td>\n",
" <td>True</td>\n",
" <td>True</td>\n",
" <td>1</td>\n",
" <td>High</td>\n",
" <td>High</td>\n",
" <td>-0.088715</td>\n",
" <td>...</td>\n",
" <td>308.5142</td>\n",
" <td>320.82160</td>\n",
" <td>196.0655</td>\n",
" <td>0.007918</td>\n",
" <td>1.144068</td>\n",
" <td>0.422891</td>\n",
" <td>311.3891</td>\n",
" <td>343.80610</td>\n",
" <td>186.5528</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2020</th>\n",
" <td>2020</td>\n",
" <td>2020</td>\n",
" <td>7</td>\n",
" <td>SortingBlocksScene</td>\n",
" <td>True</td>\n",
" <td>True</td>\n",
" <td>1</td>\n",
" <td>High</td>\n",
" <td>High</td>\n",
" <td>1.067835</td>\n",
" <td>...</td>\n",
" <td>334.3178</td>\n",
" <td>16.43365</td>\n",
" <td>271.1187</td>\n",
" <td>1.245457</td>\n",
" <td>0.619399</td>\n",
" <td>-0.084547</td>\n",
" <td>324.5029</td>\n",
" <td>26.11914</td>\n",
" <td>271.3724</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2021</th>\n",
" <td>2021</td>\n",
" <td>2021</td>\n",
" <td>7</td>\n",
" <td>SortingBlocksScene</td>\n",
" <td>True</td>\n",
" <td>True</td>\n",
" <td>1</td>\n",
" <td>High</td>\n",
" <td>High</td>\n",
" <td>1.076106</td>\n",
" <td>...</td>\n",
" <td>334.1573</td>\n",
" <td>15.85253</td>\n",
" <td>271.2372</td>\n",
" <td>1.260631</td>\n",
" <td>0.606978</td>\n",
" <td>-0.078567</td>\n",
" <td>324.4428</td>\n",
" <td>25.80618</td>\n",
" <td>271.3020</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2022</th>\n",
" <td>2022</td>\n",
" <td>2022</td>\n",
" <td>7</td>\n",
" <td>SortingBlocksScene</td>\n",
" <td>True</td>\n",
" <td>True</td>\n",
" <td>1</td>\n",
" <td>High</td>\n",
" <td>High</td>\n",
" <td>1.085397</td>\n",
" <td>...</td>\n",
" <td>334.0576</td>\n",
" <td>15.55901</td>\n",
" <td>271.0670</td>\n",
" <td>1.269063</td>\n",
" <td>0.599918</td>\n",
" <td>-0.075514</td>\n",
" <td>324.3901</td>\n",
" <td>25.65784</td>\n",
" <td>270.9597</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2023</th>\n",
" <td>2023</td>\n",
" <td>2023</td>\n",
" <td>7</td>\n",
" <td>SortingBlocksScene</td>\n",
" <td>True</td>\n",
" <td>True</td>\n",
" <td>1</td>\n",
" <td>High</td>\n",
" <td>High</td>\n",
" <td>1.096437</td>\n",
" <td>...</td>\n",
" <td>333.9445</td>\n",
" <td>15.22374</td>\n",
" <td>270.9147</td>\n",
" <td>1.278922</td>\n",
" <td>0.592047</td>\n",
" <td>-0.071804</td>\n",
" <td>324.3320</td>\n",
" <td>25.47795</td>\n",
" <td>270.6435</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2024</th>\n",
" <td>2024</td>\n",
" <td>2024</td>\n",
" <td>7</td>\n",
" <td>SortingBlocksScene</td>\n",
" <td>True</td>\n",
" <td>True</td>\n",
" <td>1</td>\n",
" <td>High</td>\n",
" <td>High</td>\n",
" <td>1.106890</td>\n",
" <td>...</td>\n",
" <td>333.7580</td>\n",
" <td>14.87231</td>\n",
" <td>270.0383</td>\n",
" <td>1.293765</td>\n",
" <td>0.578599</td>\n",
" <td>-0.066561</td>\n",
" <td>324.2077</td>\n",
" <td>25.11721</td>\n",
" <td>269.5140</td>\n",
" <td>1</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>2025 rows × 346 columns</p>\n",
"</div>"
],
"text/plain": [
" Unnamed: 0 FrameID participantID Scenario \\\n",
"0 0 0 7 SortingBlocksScene \n",
"1 1 1 7 SortingBlocksScene \n",
"2 2 2 7 SortingBlocksScene \n",
"3 3 3 7 SortingBlocksScene \n",
"4 4 4 7 SortingBlocksScene \n",
"... ... ... ... ... \n",
"2020 2020 2020 7 SortingBlocksScene \n",
"2021 2021 2021 7 SortingBlocksScene \n",
"2022 2022 2022 7 SortingBlocksScene \n",
"2023 2023 2023 7 SortingBlocksScene \n",
"2024 2024 2024 7 SortingBlocksScene \n",
"\n",
" HeightNormalization ArmNormalization Repetition \\\n",
"0 True True 1 \n",
"1 True True 1 \n",
"2 True True 1 \n",
"3 True True 1 \n",
"4 True True 1 \n",
"... ... ... ... \n",
"2020 True True 1 \n",
"2021 True True 1 \n",
"2022 True True 1 \n",
"2023 True True 1 \n",
"2024 True True 1 \n",
"\n",
" LeftHandTrackingAccuracy RightHandTrackingAccuracy \\\n",
"0 High High \n",
"1 High High \n",
"2 High High \n",
"3 High High \n",
"4 High High \n",
"... ... ... \n",
"2020 High High \n",
"2021 High High \n",
"2022 High High \n",
"2023 High High \n",
"2024 High High \n",
"\n",
" CenterEyeAnchor_pos_X ... right_Hand_RingTip_euler_X \\\n",
"0 -0.089895 ... 307.9409 \n",
"1 -0.089738 ... 308.1140 \n",
"2 -0.089347 ... 308.2395 \n",
"3 -0.088938 ... 308.3445 \n",
"4 -0.088715 ... 308.5142 \n",
"... ... ... ... \n",
"2020 1.067835 ... 334.3178 \n",
"2021 1.076106 ... 334.1573 \n",
"2022 1.085397 ... 334.0576 \n",
"2023 1.096437 ... 333.9445 \n",
"2024 1.106890 ... 333.7580 \n",
"\n",
" right_Hand_RingTip_euler_Y right_Hand_RingTip_euler_Z \\\n",
"0 320.01970 195.1051 \n",
"1 320.34520 195.5152 \n",
"2 320.51180 195.7206 \n",
"3 320.66750 195.9804 \n",
"4 320.82160 196.0655 \n",
"... ... ... \n",
"2020 16.43365 271.1187 \n",
"2021 15.85253 271.2372 \n",
"2022 15.55901 271.0670 \n",
"2023 15.22374 270.9147 \n",
"2024 14.87231 270.0383 \n",
"\n",
" right_Hand_PinkyTip_pos_X right_Hand_PinkyTip_pos_Y \\\n",
"0 0.016631 1.106319 \n",
"1 0.007256 1.145476 \n",
"2 0.007426 1.144992 \n",
"3 0.007635 1.144509 \n",
"4 0.007918 1.144068 \n",
"... ... ... \n",
"2020 1.245457 0.619399 \n",
"2021 1.260631 0.606978 \n",
"2022 1.269063 0.599918 \n",
"2023 1.278922 0.592047 \n",
"2024 1.293765 0.578599 \n",
"\n",
" right_Hand_PinkyTip_pos_Z right_Hand_PinkyTip_euler_X \\\n",
"0 0.430588 310.8786 \n",
"1 0.423464 311.1056 \n",
"2 0.423223 311.2307 \n",
"3 0.423137 311.3370 \n",
"4 0.422891 311.3891 \n",
"... ... ... \n",
"2020 -0.084547 324.5029 \n",
"2021 -0.078567 324.4428 \n",
"2022 -0.075514 324.3901 \n",
"2023 -0.071804 324.3320 \n",
"2024 -0.066561 324.2077 \n",
"\n",
" right_Hand_PinkyTip_euler_Y right_Hand_PinkyTip_euler_Z Session \n",
"0 343.57170 185.1874 1 \n",
"1 343.74560 185.6717 1 \n",
"2 343.79710 185.9125 1 \n",
"3 343.84570 186.1985 1 \n",
"4 343.80610 186.5528 1 \n",
"... ... ... ... \n",
"2020 26.11914 271.3724 1 \n",
"2021 25.80618 271.3020 1 \n",
"2022 25.65784 270.9597 1 \n",
"2023 25.47795 270.6435 1 \n",
"2024 25.11721 269.5140 1 \n",
"\n",
"[2025 rows x 346 columns]"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"fil_dic_data = []\n",
"for d in dic_data:\n",
" if d['scenario'] == 'Sorting':\n",
" if d['heightnorm'] == d['armnorm']:\n",
" fil_dic_data.append(d)\n",
"\n",
"print(len(fil_dic_data))\n",
"test_entry = fil_dic_data[15].copy()\n",
"test_entry['data']"
]
},
{
"cell_type": "code",
"execution_count": 81,
"id": "8d956063",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Unnamed: 0</th>\n",
" <th>LeftHandTrackingAccuracy</th>\n",
" <th>RightHandTrackingAccuracy</th>\n",
" <th>CenterEyeAnchor_pos_X</th>\n",
" <th>CenterEyeAnchor_pos_Y</th>\n",
" <th>CenterEyeAnchor_pos_Z</th>\n",
" <th>CenterEyeAnchor_euler_X</th>\n",
" <th>CenterEyeAnchor_euler_Y</th>\n",
" <th>CenterEyeAnchor_euler_Z</th>\n",
" <th>left_OVRHandPrefab_pos_X</th>\n",
" <th>...</th>\n",
" <th>right_Hand_RingTip_pos_Z</th>\n",
" <th>right_Hand_RingTip_euler_X</th>\n",
" <th>right_Hand_RingTip_euler_Y</th>\n",
" <th>right_Hand_RingTip_euler_Z</th>\n",
" <th>right_Hand_PinkyTip_pos_X</th>\n",
" <th>right_Hand_PinkyTip_pos_Y</th>\n",
" <th>right_Hand_PinkyTip_pos_Z</th>\n",
" <th>right_Hand_PinkyTip_euler_X</th>\n",
" <th>right_Hand_PinkyTip_euler_Y</th>\n",
" <th>right_Hand_PinkyTip_euler_Z</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>0</td>\n",
" <td>High</td>\n",
" <td>High</td>\n",
" <td>-0.089895</td>\n",
" <td>1.755665</td>\n",
" <td>0.234344</td>\n",
" <td>9.332605</td>\n",
" <td>5.018498</td>\n",
" <td>358.49900</td>\n",
" <td>-0.316633</td>\n",
" <td>...</td>\n",
" <td>0.446973</td>\n",
" <td>307.9409</td>\n",
" <td>320.01970</td>\n",
" <td>195.1051</td>\n",
" <td>0.016631</td>\n",
" <td>1.106319</td>\n",
" <td>0.430588</td>\n",
" <td>310.8786</td>\n",
" <td>343.57170</td>\n",
" <td>185.1874</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>1</td>\n",
" <td>High</td>\n",
" <td>High</td>\n",
" <td>-0.089738</td>\n",
" <td>1.755732</td>\n",
" <td>0.234542</td>\n",
" <td>9.338191</td>\n",
" <td>5.061474</td>\n",
" <td>358.47840</td>\n",
" <td>-0.300754</td>\n",
" <td>...</td>\n",
" <td>0.440061</td>\n",
" <td>308.1140</td>\n",
" <td>320.34520</td>\n",
" <td>195.5152</td>\n",
" <td>0.007256</td>\n",
" <td>1.145476</td>\n",
" <td>0.423464</td>\n",
" <td>311.1056</td>\n",
" <td>343.74560</td>\n",
" <td>185.6717</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>2</td>\n",
" <td>High</td>\n",
" <td>High</td>\n",
" <td>-0.089347</td>\n",
" <td>1.755780</td>\n",
" <td>0.234738</td>\n",
" <td>9.343684</td>\n",
" <td>5.115413</td>\n",
" <td>358.46080</td>\n",
" <td>-0.300725</td>\n",
" <td>...</td>\n",
" <td>0.439948</td>\n",
" <td>308.2395</td>\n",
" <td>320.51180</td>\n",
" <td>195.7206</td>\n",
" <td>0.007426</td>\n",
" <td>1.144992</td>\n",
" <td>0.423223</td>\n",
" <td>311.2307</td>\n",
" <td>343.79710</td>\n",
" <td>185.9125</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>3</td>\n",
" <td>High</td>\n",
" <td>High</td>\n",
" <td>-0.088938</td>\n",
" <td>1.755686</td>\n",
" <td>0.234353</td>\n",
" <td>9.335765</td>\n",
" <td>5.173394</td>\n",
" <td>358.46820</td>\n",
" <td>-0.300701</td>\n",
" <td>...</td>\n",
" <td>0.439995</td>\n",
" <td>308.3445</td>\n",
" <td>320.66750</td>\n",
" <td>195.9804</td>\n",
" <td>0.007635</td>\n",
" <td>1.144509</td>\n",
" <td>0.423137</td>\n",
" <td>311.3370</td>\n",
" <td>343.84570</td>\n",
" <td>186.1985</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>4</td>\n",
" <td>High</td>\n",
" <td>High</td>\n",
" <td>-0.088715</td>\n",
" <td>1.755643</td>\n",
" <td>0.234471</td>\n",
" <td>9.326243</td>\n",
" <td>5.247888</td>\n",
" <td>358.46250</td>\n",
" <td>-0.300564</td>\n",
" <td>...</td>\n",
" <td>0.439725</td>\n",
" <td>308.5142</td>\n",
" <td>320.82160</td>\n",
" <td>196.0655</td>\n",
" <td>0.007918</td>\n",
" <td>1.144068</td>\n",
" <td>0.422891</td>\n",
" <td>311.3891</td>\n",
" <td>343.80610</td>\n",
" <td>186.5528</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2020</th>\n",
" <td>2020</td>\n",
" <td>High</td>\n",
" <td>High</td>\n",
" <td>1.067835</td>\n",
" <td>1.149886</td>\n",
" <td>0.087708</td>\n",
" <td>57.752440</td>\n",
" <td>88.466320</td>\n",
" <td>13.97530</td>\n",
" <td>0.684950</td>\n",
" <td>...</td>\n",
" <td>-0.064587</td>\n",
" <td>334.3178</td>\n",
" <td>16.43365</td>\n",
" <td>271.1187</td>\n",
" <td>1.245457</td>\n",
" <td>0.619399</td>\n",
" <td>-0.084547</td>\n",
" <td>324.5029</td>\n",
" <td>26.11914</td>\n",
" <td>271.3724</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2021</th>\n",
" <td>2021</td>\n",
" <td>High</td>\n",
" <td>High</td>\n",
" <td>1.076106</td>\n",
" <td>1.142307</td>\n",
" <td>0.086917</td>\n",
" <td>58.376460</td>\n",
" <td>87.832810</td>\n",
" <td>13.81248</td>\n",
" <td>0.696102</td>\n",
" <td>...</td>\n",
" <td>-0.058271</td>\n",
" <td>334.1573</td>\n",
" <td>15.85253</td>\n",
" <td>271.2372</td>\n",
" <td>1.260631</td>\n",
" <td>0.606978</td>\n",
" <td>-0.078567</td>\n",
" <td>324.4428</td>\n",
" <td>25.80618</td>\n",
" <td>271.3020</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2022</th>\n",
" <td>2022</td>\n",
" <td>High</td>\n",
" <td>High</td>\n",
" <td>1.085397</td>\n",
" <td>1.135880</td>\n",
" <td>0.086078</td>\n",
" <td>59.298770</td>\n",
" <td>87.606250</td>\n",
" <td>13.54412</td>\n",
" <td>0.702457</td>\n",
" <td>...</td>\n",
" <td>-0.055092</td>\n",
" <td>334.0576</td>\n",
" <td>15.55901</td>\n",
" <td>271.0670</td>\n",
" <td>1.269063</td>\n",
" <td>0.599918</td>\n",
" <td>-0.075514</td>\n",
" <td>324.3901</td>\n",
" <td>25.65784</td>\n",
" <td>270.9597</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2023</th>\n",
" <td>2023</td>\n",
" <td>High</td>\n",
" <td>High</td>\n",
" <td>1.096437</td>\n",
" <td>1.129293</td>\n",
" <td>0.084847</td>\n",
" <td>60.217070</td>\n",
" <td>87.791440</td>\n",
" <td>13.38561</td>\n",
" <td>0.709858</td>\n",
" <td>...</td>\n",
" <td>-0.051225</td>\n",
" <td>333.9445</td>\n",
" <td>15.22374</td>\n",
" <td>270.9147</td>\n",
" <td>1.278922</td>\n",
" <td>0.592047</td>\n",
" <td>-0.071804</td>\n",
" <td>324.3320</td>\n",
" <td>25.47795</td>\n",
" <td>270.6435</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2024</th>\n",
" <td>2024</td>\n",
" <td>High</td>\n",
" <td>High</td>\n",
" <td>1.106890</td>\n",
" <td>1.123694</td>\n",
" <td>0.084149</td>\n",
" <td>60.877950</td>\n",
" <td>87.967790</td>\n",
" <td>13.39271</td>\n",
" <td>0.720758</td>\n",
" <td>...</td>\n",
" <td>-0.046066</td>\n",
" <td>333.7580</td>\n",
" <td>14.87231</td>\n",
" <td>270.0383</td>\n",
" <td>1.293765</td>\n",
" <td>0.578599</td>\n",
" <td>-0.066561</td>\n",
" <td>324.2077</td>\n",
" <td>25.11721</td>\n",
" <td>269.5140</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>2025 rows × 339 columns</p>\n",
"</div>"
],
"text/plain": [
" Unnamed: 0 LeftHandTrackingAccuracy RightHandTrackingAccuracy \\\n",
"0 0 High High \n",
"1 1 High High \n",
"2 2 High High \n",
"3 3 High High \n",
"4 4 High High \n",
"... ... ... ... \n",
"2020 2020 High High \n",
"2021 2021 High High \n",
"2022 2022 High High \n",
"2023 2023 High High \n",
"2024 2024 High High \n",
"\n",
" CenterEyeAnchor_pos_X CenterEyeAnchor_pos_Y CenterEyeAnchor_pos_Z \\\n",
"0 -0.089895 1.755665 0.234344 \n",
"1 -0.089738 1.755732 0.234542 \n",
"2 -0.089347 1.755780 0.234738 \n",
"3 -0.088938 1.755686 0.234353 \n",
"4 -0.088715 1.755643 0.234471 \n",
"... ... ... ... \n",
"2020 1.067835 1.149886 0.087708 \n",
"2021 1.076106 1.142307 0.086917 \n",
"2022 1.085397 1.135880 0.086078 \n",
"2023 1.096437 1.129293 0.084847 \n",
"2024 1.106890 1.123694 0.084149 \n",
"\n",
" CenterEyeAnchor_euler_X CenterEyeAnchor_euler_Y \\\n",
"0 9.332605 5.018498 \n",
"1 9.338191 5.061474 \n",
"2 9.343684 5.115413 \n",
"3 9.335765 5.173394 \n",
"4 9.326243 5.247888 \n",
"... ... ... \n",
"2020 57.752440 88.466320 \n",
"2021 58.376460 87.832810 \n",
"2022 59.298770 87.606250 \n",
"2023 60.217070 87.791440 \n",
"2024 60.877950 87.967790 \n",
"\n",
" CenterEyeAnchor_euler_Z left_OVRHandPrefab_pos_X ... \\\n",
"0 358.49900 -0.316633 ... \n",
"1 358.47840 -0.300754 ... \n",
"2 358.46080 -0.300725 ... \n",
"3 358.46820 -0.300701 ... \n",
"4 358.46250 -0.300564 ... \n",
"... ... ... ... \n",
"2020 13.97530 0.684950 ... \n",
"2021 13.81248 0.696102 ... \n",
"2022 13.54412 0.702457 ... \n",
"2023 13.38561 0.709858 ... \n",
"2024 13.39271 0.720758 ... \n",
"\n",
" right_Hand_RingTip_pos_Z right_Hand_RingTip_euler_X \\\n",
"0 0.446973 307.9409 \n",
"1 0.440061 308.1140 \n",
"2 0.439948 308.2395 \n",
"3 0.439995 308.3445 \n",
"4 0.439725 308.5142 \n",
"... ... ... \n",
"2020 -0.064587 334.3178 \n",
"2021 -0.058271 334.1573 \n",
"2022 -0.055092 334.0576 \n",
"2023 -0.051225 333.9445 \n",
"2024 -0.046066 333.7580 \n",
"\n",
" right_Hand_RingTip_euler_Y right_Hand_RingTip_euler_Z \\\n",
"0 320.01970 195.1051 \n",
"1 320.34520 195.5152 \n",
"2 320.51180 195.7206 \n",
"3 320.66750 195.9804 \n",
"4 320.82160 196.0655 \n",
"... ... ... \n",
"2020 16.43365 271.1187 \n",
"2021 15.85253 271.2372 \n",
"2022 15.55901 271.0670 \n",
"2023 15.22374 270.9147 \n",
"2024 14.87231 270.0383 \n",
"\n",
" right_Hand_PinkyTip_pos_X right_Hand_PinkyTip_pos_Y \\\n",
"0 0.016631 1.106319 \n",
"1 0.007256 1.145476 \n",
"2 0.007426 1.144992 \n",
"3 0.007635 1.144509 \n",
"4 0.007918 1.144068 \n",
"... ... ... \n",
"2020 1.245457 0.619399 \n",
"2021 1.260631 0.606978 \n",
"2022 1.269063 0.599918 \n",
"2023 1.278922 0.592047 \n",
"2024 1.293765 0.578599 \n",
"\n",
" right_Hand_PinkyTip_pos_Z right_Hand_PinkyTip_euler_X \\\n",
"0 0.430588 310.8786 \n",
"1 0.423464 311.1056 \n",
"2 0.423223 311.2307 \n",
"3 0.423137 311.3370 \n",
"4 0.422891 311.3891 \n",
"... ... ... \n",
"2020 -0.084547 324.5029 \n",
"2021 -0.078567 324.4428 \n",
"2022 -0.075514 324.3901 \n",
"2023 -0.071804 324.3320 \n",
"2024 -0.066561 324.2077 \n",
"\n",
" right_Hand_PinkyTip_euler_Y right_Hand_PinkyTip_euler_Z \n",
"0 343.57170 185.1874 \n",
"1 343.74560 185.6717 \n",
"2 343.79710 185.9125 \n",
"3 343.84570 186.1985 \n",
"4 343.80610 186.5528 \n",
"... ... ... \n",
"2020 26.11914 271.3724 \n",
"2021 25.80618 271.3020 \n",
"2022 25.65784 270.9597 \n",
"2023 25.47795 270.6435 \n",
"2024 25.11721 269.5140 \n",
"\n",
"[2025 rows x 339 columns]"
]
},
"execution_count": 81,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"def drop(entry) -> pd.DataFrame:\n",
" droptable = ['participantID', 'FrameID', 'Scenario', 'HeightNormalization', 'ArmNormalization', 'Repetition', 'Session']\n",
" centry = entry.copy()\n",
" return centry['data'].drop(droptable, axis=1)\n",
"\n",
"test_entry2 = test_entry.copy()\n",
"test_entry2['data'] = drop(test_entry)\n",
"test_entry2['data']"
]
},
{
"cell_type": "code",
"execution_count": 95,
"id": "97c3ba71",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Unnamed: 0</th>\n",
" <th>LeftHandTrackingAccuracy</th>\n",
" <th>RightHandTrackingAccuracy</th>\n",
" <th>CenterEyeAnchor_pos_X</th>\n",
" <th>CenterEyeAnchor_pos_Y</th>\n",
" <th>CenterEyeAnchor_pos_Z</th>\n",
" <th>CenterEyeAnchor_euler_X</th>\n",
" <th>CenterEyeAnchor_euler_Y</th>\n",
" <th>CenterEyeAnchor_euler_Z</th>\n",
" <th>left_OVRHandPrefab_pos_X</th>\n",
" <th>...</th>\n",
" <th>right_Hand_RingTip_pos_Z</th>\n",
" <th>right_Hand_RingTip_euler_X</th>\n",
" <th>right_Hand_RingTip_euler_Y</th>\n",
" <th>right_Hand_RingTip_euler_Z</th>\n",
" <th>right_Hand_PinkyTip_pos_X</th>\n",
" <th>right_Hand_PinkyTip_pos_Y</th>\n",
" <th>right_Hand_PinkyTip_pos_Z</th>\n",
" <th>right_Hand_PinkyTip_euler_X</th>\n",
" <th>right_Hand_PinkyTip_euler_Y</th>\n",
" <th>right_Hand_PinkyTip_euler_Z</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>0</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>-0.089895</td>\n",
" <td>1.755665</td>\n",
" <td>0.234344</td>\n",
" <td>9.332605</td>\n",
" <td>5.018498</td>\n",
" <td>358.49900</td>\n",
" <td>-0.316633</td>\n",
" <td>...</td>\n",
" <td>0.446973</td>\n",
" <td>307.9409</td>\n",
" <td>320.01970</td>\n",
" <td>195.1051</td>\n",
" <td>0.016631</td>\n",
" <td>1.106319</td>\n",
" <td>0.430588</td>\n",
" <td>310.8786</td>\n",
" <td>343.57170</td>\n",
" <td>185.1874</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>1</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>-0.089738</td>\n",
" <td>1.755732</td>\n",
" <td>0.234542</td>\n",
" <td>9.338191</td>\n",
" <td>5.061474</td>\n",
" <td>358.47840</td>\n",
" <td>-0.300754</td>\n",
" <td>...</td>\n",
" <td>0.440061</td>\n",
" <td>308.1140</td>\n",
" <td>320.34520</td>\n",
" <td>195.5152</td>\n",
" <td>0.007256</td>\n",
" <td>1.145476</td>\n",
" <td>0.423464</td>\n",
" <td>311.1056</td>\n",
" <td>343.74560</td>\n",
" <td>185.6717</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>2</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>-0.089347</td>\n",
" <td>1.755780</td>\n",
" <td>0.234738</td>\n",
" <td>9.343684</td>\n",
" <td>5.115413</td>\n",
" <td>358.46080</td>\n",
" <td>-0.300725</td>\n",
" <td>...</td>\n",
" <td>0.439948</td>\n",
" <td>308.2395</td>\n",
" <td>320.51180</td>\n",
" <td>195.7206</td>\n",
" <td>0.007426</td>\n",
" <td>1.144992</td>\n",
" <td>0.423223</td>\n",
" <td>311.2307</td>\n",
" <td>343.79710</td>\n",
" <td>185.9125</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>3</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>-0.088938</td>\n",
" <td>1.755686</td>\n",
" <td>0.234353</td>\n",
" <td>9.335765</td>\n",
" <td>5.173394</td>\n",
" <td>358.46820</td>\n",
" <td>-0.300701</td>\n",
" <td>...</td>\n",
" <td>0.439995</td>\n",
" <td>308.3445</td>\n",
" <td>320.66750</td>\n",
" <td>195.9804</td>\n",
" <td>0.007635</td>\n",
" <td>1.144509</td>\n",
" <td>0.423137</td>\n",
" <td>311.3370</td>\n",
" <td>343.84570</td>\n",
" <td>186.1985</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>4</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>-0.088715</td>\n",
" <td>1.755643</td>\n",
" <td>0.234471</td>\n",
" <td>9.326243</td>\n",
" <td>5.247888</td>\n",
" <td>358.46250</td>\n",
" <td>-0.300564</td>\n",
" <td>...</td>\n",
" <td>0.439725</td>\n",
" <td>308.5142</td>\n",
" <td>320.82160</td>\n",
" <td>196.0655</td>\n",
" <td>0.007918</td>\n",
" <td>1.144068</td>\n",
" <td>0.422891</td>\n",
" <td>311.3891</td>\n",
" <td>343.80610</td>\n",
" <td>186.5528</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2020</th>\n",
" <td>2020</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>1.067835</td>\n",
" <td>1.149886</td>\n",
" <td>0.087708</td>\n",
" <td>57.752440</td>\n",
" <td>88.466320</td>\n",
" <td>13.97530</td>\n",
" <td>0.684950</td>\n",
" <td>...</td>\n",
" <td>-0.064587</td>\n",
" <td>334.3178</td>\n",
" <td>16.43365</td>\n",
" <td>271.1187</td>\n",
" <td>1.245457</td>\n",
" <td>0.619399</td>\n",
" <td>-0.084547</td>\n",
" <td>324.5029</td>\n",
" <td>26.11914</td>\n",
" <td>271.3724</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2021</th>\n",
" <td>2021</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>1.076106</td>\n",
" <td>1.142307</td>\n",
" <td>0.086917</td>\n",
" <td>58.376460</td>\n",
" <td>87.832810</td>\n",
" <td>13.81248</td>\n",
" <td>0.696102</td>\n",
" <td>...</td>\n",
" <td>-0.058271</td>\n",
" <td>334.1573</td>\n",
" <td>15.85253</td>\n",
" <td>271.2372</td>\n",
" <td>1.260631</td>\n",
" <td>0.606978</td>\n",
" <td>-0.078567</td>\n",
" <td>324.4428</td>\n",
" <td>25.80618</td>\n",
" <td>271.3020</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2022</th>\n",
" <td>2022</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>1.085397</td>\n",
" <td>1.135880</td>\n",
" <td>0.086078</td>\n",
" <td>59.298770</td>\n",
" <td>87.606250</td>\n",
" <td>13.54412</td>\n",
" <td>0.702457</td>\n",
" <td>...</td>\n",
" <td>-0.055092</td>\n",
" <td>334.0576</td>\n",
" <td>15.55901</td>\n",
" <td>271.0670</td>\n",
" <td>1.269063</td>\n",
" <td>0.599918</td>\n",
" <td>-0.075514</td>\n",
" <td>324.3901</td>\n",
" <td>25.65784</td>\n",
" <td>270.9597</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2023</th>\n",
" <td>2023</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>1.096437</td>\n",
" <td>1.129293</td>\n",
" <td>0.084847</td>\n",
" <td>60.217070</td>\n",
" <td>87.791440</td>\n",
" <td>13.38561</td>\n",
" <td>0.709858</td>\n",
" <td>...</td>\n",
" <td>-0.051225</td>\n",
" <td>333.9445</td>\n",
" <td>15.22374</td>\n",
" <td>270.9147</td>\n",
" <td>1.278922</td>\n",
" <td>0.592047</td>\n",
" <td>-0.071804</td>\n",
" <td>324.3320</td>\n",
" <td>25.47795</td>\n",
" <td>270.6435</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2024</th>\n",
" <td>2024</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>1.106890</td>\n",
" <td>1.123694</td>\n",
" <td>0.084149</td>\n",
" <td>60.877950</td>\n",
" <td>87.967790</td>\n",
" <td>13.39271</td>\n",
" <td>0.720758</td>\n",
" <td>...</td>\n",
" <td>-0.046066</td>\n",
" <td>333.7580</td>\n",
" <td>14.87231</td>\n",
" <td>270.0383</td>\n",
" <td>1.293765</td>\n",
" <td>0.578599</td>\n",
" <td>-0.066561</td>\n",
" <td>324.2077</td>\n",
" <td>25.11721</td>\n",
" <td>269.5140</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>2025 rows × 339 columns</p>\n",
"</div>"
],
"text/plain": [
" Unnamed: 0 LeftHandTrackingAccuracy RightHandTrackingAccuracy \\\n",
"0 0 0.0 0.0 \n",
"1 1 0.0 0.0 \n",
"2 2 0.0 0.0 \n",
"3 3 0.0 0.0 \n",
"4 4 0.0 0.0 \n",
"... ... ... ... \n",
"2020 2020 0.0 0.0 \n",
"2021 2021 0.0 0.0 \n",
"2022 2022 0.0 0.0 \n",
"2023 2023 0.0 0.0 \n",
"2024 2024 0.0 0.0 \n",
"\n",
" CenterEyeAnchor_pos_X CenterEyeAnchor_pos_Y CenterEyeAnchor_pos_Z \\\n",
"0 -0.089895 1.755665 0.234344 \n",
"1 -0.089738 1.755732 0.234542 \n",
"2 -0.089347 1.755780 0.234738 \n",
"3 -0.088938 1.755686 0.234353 \n",
"4 -0.088715 1.755643 0.234471 \n",
"... ... ... ... \n",
"2020 1.067835 1.149886 0.087708 \n",
"2021 1.076106 1.142307 0.086917 \n",
"2022 1.085397 1.135880 0.086078 \n",
"2023 1.096437 1.129293 0.084847 \n",
"2024 1.106890 1.123694 0.084149 \n",
"\n",
" CenterEyeAnchor_euler_X CenterEyeAnchor_euler_Y \\\n",
"0 9.332605 5.018498 \n",
"1 9.338191 5.061474 \n",
"2 9.343684 5.115413 \n",
"3 9.335765 5.173394 \n",
"4 9.326243 5.247888 \n",
"... ... ... \n",
"2020 57.752440 88.466320 \n",
"2021 58.376460 87.832810 \n",
"2022 59.298770 87.606250 \n",
"2023 60.217070 87.791440 \n",
"2024 60.877950 87.967790 \n",
"\n",
" CenterEyeAnchor_euler_Z left_OVRHandPrefab_pos_X ... \\\n",
"0 358.49900 -0.316633 ... \n",
"1 358.47840 -0.300754 ... \n",
"2 358.46080 -0.300725 ... \n",
"3 358.46820 -0.300701 ... \n",
"4 358.46250 -0.300564 ... \n",
"... ... ... ... \n",
"2020 13.97530 0.684950 ... \n",
"2021 13.81248 0.696102 ... \n",
"2022 13.54412 0.702457 ... \n",
"2023 13.38561 0.709858 ... \n",
"2024 13.39271 0.720758 ... \n",
"\n",
" right_Hand_RingTip_pos_Z right_Hand_RingTip_euler_X \\\n",
"0 0.446973 307.9409 \n",
"1 0.440061 308.1140 \n",
"2 0.439948 308.2395 \n",
"3 0.439995 308.3445 \n",
"4 0.439725 308.5142 \n",
"... ... ... \n",
"2020 -0.064587 334.3178 \n",
"2021 -0.058271 334.1573 \n",
"2022 -0.055092 334.0576 \n",
"2023 -0.051225 333.9445 \n",
"2024 -0.046066 333.7580 \n",
"\n",
" right_Hand_RingTip_euler_Y right_Hand_RingTip_euler_Z \\\n",
"0 320.01970 195.1051 \n",
"1 320.34520 195.5152 \n",
"2 320.51180 195.7206 \n",
"3 320.66750 195.9804 \n",
"4 320.82160 196.0655 \n",
"... ... ... \n",
"2020 16.43365 271.1187 \n",
"2021 15.85253 271.2372 \n",
"2022 15.55901 271.0670 \n",
"2023 15.22374 270.9147 \n",
"2024 14.87231 270.0383 \n",
"\n",
" right_Hand_PinkyTip_pos_X right_Hand_PinkyTip_pos_Y \\\n",
"0 0.016631 1.106319 \n",
"1 0.007256 1.145476 \n",
"2 0.007426 1.144992 \n",
"3 0.007635 1.144509 \n",
"4 0.007918 1.144068 \n",
"... ... ... \n",
"2020 1.245457 0.619399 \n",
"2021 1.260631 0.606978 \n",
"2022 1.269063 0.599918 \n",
"2023 1.278922 0.592047 \n",
"2024 1.293765 0.578599 \n",
"\n",
" right_Hand_PinkyTip_pos_Z right_Hand_PinkyTip_euler_X \\\n",
"0 0.430588 310.8786 \n",
"1 0.423464 311.1056 \n",
"2 0.423223 311.2307 \n",
"3 0.423137 311.3370 \n",
"4 0.422891 311.3891 \n",
"... ... ... \n",
"2020 -0.084547 324.5029 \n",
"2021 -0.078567 324.4428 \n",
"2022 -0.075514 324.3901 \n",
"2023 -0.071804 324.3320 \n",
"2024 -0.066561 324.2077 \n",
"\n",
" right_Hand_PinkyTip_euler_Y right_Hand_PinkyTip_euler_Z \n",
"0 343.57170 185.1874 \n",
"1 343.74560 185.6717 \n",
"2 343.79710 185.9125 \n",
"3 343.84570 186.1985 \n",
"4 343.80610 186.5528 \n",
"... ... ... \n",
"2020 26.11914 271.3724 \n",
"2021 25.80618 271.3020 \n",
"2022 25.65784 270.9597 \n",
"2023 25.47795 270.6435 \n",
"2024 25.11721 269.5140 \n",
"\n",
"[2025 rows x 339 columns]"
]
},
"execution_count": 95,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"def floatize(entry):\n",
" centry = entry.copy()\n",
" centry['data']['LeftHandTrackingAccuracy'] = (entry['data']['LeftHandTrackingAccuracy'] == 'High') * 1.0\n",
" centry['data']['RightHandTrackingAccuracy'] = (entry['data']['RightHandTrackingAccuracy'] == 'High') * 1.0\n",
" return centry['data']\n",
"\n",
"test_entry3 = test_entry2.copy()\n",
"test_entry3['data'] = floatize(test_entry2)\n",
"test_entry3['data']"
]
},
{
"cell_type": "code",
"execution_count": 96,
"id": "7ab1aa62",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(2025, 339)\n"
]
},
{
"data": {
"text/plain": [
"<BatchDataset shapes: ((None, None, 2100), (None,)), types: (tf.float64, tf.int32)>"
]
},
"execution_count": 96,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from tensorflow.keras.preprocessing import timeseries_dataset_from_array\n",
"from tensorflow.keras.preprocessing.sequence import pad_sequences\n",
"\n",
"def slicing(entry):\n",
" stride = 150\n",
" print(entry['data'].to_numpy().shape)\n",
" entry['data'] = pad_sequences(entry['data'].to_numpy(),\n",
" maxlen=(int(entry['data'].shape[0]/stride)+1)*stride,\n",
" dtype='float64',\n",
" padding='pre', truncating='post'\n",
" )\n",
"\n",
" return timeseries_dataset_from_array(\n",
" data=entry['data'], \n",
" targets=[entry['user'] for _ in range(entry['data'].shape[0])], \n",
" sequence_length=300,\n",
" sequence_stride=150, \n",
" batch_size=1, \n",
" seed=177013\n",
" )\n",
"\n",
"test_entry4 = test_entry3.copy()\n",
"test_entry4['data'] = slicing(test_entry3)\n",
"test_entry4['data']"
]
},
{
"cell_type": "code",
"execution_count": 97,
"id": "8827bbab",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"tf.Tensor(\n",
"[[[ 0. 0. 0. ... 310.8786 343.5717 185.1874]\n",
" [ 0. 0. 0. ... 311.1056 343.7456 185.6717]\n",
" [ 0. 0. 0. ... 311.2307 343.7971 185.9125]\n",
" ...\n",
" [ 0. 0. 0. ... 334.9102 105.7513 287.5223]\n",
" [ 0. 0. 0. ... 334.6709 104.5253 287.9581]\n",
" [ 0. 0. 0. ... 334.5766 103.5059 288.4085]]], shape=(1, 300, 2100), dtype=float64)\n",
"tf.Tensor([7], shape=(1,), dtype=int32)\n",
"tf.Tensor(\n",
"[[[ 0. 0. 0. ... 337.3954 115.2253 239.2146 ]\n",
" [ 0. 0. 0. ... 337.7683 115.3956 240.4796 ]\n",
" [ 0. 0. 0. ... 338.0132 115.4679 241.2587 ]\n",
" ...\n",
" [ 0. 0. 0. ... 332.9107 41.93251 124.3949 ]\n",
" [ 0. 0. 0. ... 333.1059 40.51485 124.8919 ]\n",
" [ 0. 0. 0. ... 332.9174 39.48595 125.2935 ]]], shape=(1, 300, 2100), dtype=float64)\n",
"tf.Tensor([7], shape=(1,), dtype=int32)\n",
"tf.Tensor(\n",
"[[[ 0. 0. 0. ... 334.441 102.5691 288.6859]\n",
" [ 0. 0. 0. ... 334.4541 101.1844 290.0429]\n",
" [ 0. 0. 0. ... 334.5445 100.4508 291.0764]\n",
" ...\n",
" [ 0. 0. 0. ... 342.0367 322.5176 287.4604]\n",
" [ 0. 0. 0. ... 341.5087 322.9041 288.0399]\n",
" [ 0. 0. 0. ... 341.0814 323.1584 288.53 ]]], shape=(1, 300, 2100), dtype=float64)\n",
"tf.Tensor([7], shape=(1,), dtype=int32)\n",
"tf.Tensor(\n",
"[[[ 0. 0. 0. ... 332.7831 38.47573 125.6316 ]\n",
" [ 0. 0. 0. ... 332.4827 36.4628 126.487 ]\n",
" [ 0. 0. 0. ... 332.2903 35.13992 127.0712 ]\n",
" ...\n",
" [ 0. 0. 0. ... 358.9955 91.98264 223.499 ]\n",
" [ 0. 0. 0. ... 358.6208 91.1073 225.3601 ]\n",
" [ 0. 0. 0. ... 358.354 90.26964 227.1508 ]]], shape=(1, 300, 2100), dtype=float64)\n",
"tf.Tensor([7], shape=(1,), dtype=int32)\n",
"tf.Tensor(\n",
"[[[ 0. 0. 0. ... 340.7549 323.3292 289.6002 ]\n",
" [ 0. 0. 0. ... 340.5391 323.4655 290.4398 ]\n",
" [ 0. 0. 0. ... 340.3628 323.5816 291.6447 ]\n",
" ...\n",
" [ 0. 0. 0. ... 334.6424 149.6268 96.6635 ]\n",
" [ 0. 0. 0. ... 335.1271 151.0876 96.39161]\n",
" [ 0. 0. 0. ... 335.5759 152.4971 96.23958]]], shape=(1, 300, 2100), dtype=float64)\n",
"tf.Tensor([7], shape=(1,), dtype=int32)\n",
"tf.Tensor(\n",
"[[[ 0. 0. 0. ... 358.0558 89.08697 228.282 ]\n",
" [ 0. 0. 0. ... 357.9095 88.468 228.3914 ]\n",
" [ 0. 0. 0. ... 357.7622 87.76212 228.7186 ]\n",
" ...\n",
" [ 0. 0. 0. ... 350.4678 191.8058 293.6591 ]\n",
" [ 0. 0. 0. ... 349.4155 191.758 290.0341 ]\n",
" [ 0. 0. 0. ... 348.4454 191.7047 286.47 ]]], shape=(1, 300, 2100), dtype=float64)\n",
"tf.Tensor([7], shape=(1,), dtype=int32)\n",
"tf.Tensor(\n",
"[[[ 0. 0. 0. ... 336.1516 154.5288 95.77281 ]\n",
" [ 0. 0. 0. ... 336.4283 155.5994 95.43106 ]\n",
" [ 0. 0. 0. ... 336.7111 156.6993 95.16699 ]\n",
" ...\n",
" [ 0. 0. 0. ... 1.877451 189.7006 176.2247 ]\n",
" [ 0. 0. 0. ... 2.298272 189.6146 174.1894 ]\n",
" [ 0. 0. 0. ... 2.357256 189.587 173.9407 ]]], shape=(1, 300, 2100), dtype=float64)\n",
"tf.Tensor([7], shape=(1,), dtype=int32)\n",
"tf.Tensor(\n",
"[[[ 0. 0. 0. ... 347.4656 193.364 277.8619 ]\n",
" [ 0. 0. 0. ... 347.1607 194.9414 272.1756 ]\n",
" [ 0. 0. 0. ... 346.816 196.2879 266.7031 ]\n",
" ...\n",
" [ 0. 0. 0. ... 328.2634 195.3502 53.96029]\n",
" [ 0. 0. 0. ... 328.1786 200.2938 56.4752 ]\n",
" [ 0. 0. 0. ... 328.5285 204.5934 59.88613]]], shape=(1, 300, 2100), dtype=float64)\n",
"tf.Tensor([7], shape=(1,), dtype=int32)\n",
"tf.Tensor(\n",
"[[[ 0. 0. 0. ... 2.574736 189.5766 172.9151 ]\n",
" [ 0. 0. 0. ... 2.947406 189.6876 171.4222 ]\n",
" [ 0. 0. 0. ... 3.538999 190.0329 169.4787 ]\n",
" ...\n",
" [ 0. 0. 0. ... 339.8397 195.9552 144.3933 ]\n",
" [ 0. 0. 0. ... 339.8964 192.4409 148.1278 ]\n",
" [ 0. 0. 0. ... 340.1847 190.5611 150.9379 ]]], shape=(1, 300, 2100), dtype=float64)\n",
"tf.Tensor([7], shape=(1,), dtype=int32)\n",
"tf.Tensor(\n",
"[[[ 0. 0. 0. ... 328.807 209.356 64.13982]\n",
" [ 0. 0. 0. ... 329.1744 219.1686 82.03358]\n",
" [ 0. 0. 0. ... 328.9293 224.907 95.42315]\n",
" ...\n",
" [ 0. 0. 0. ... 311.8901 182.3479 207.4501 ]\n",
" [ 0. 0. 0. ... 296.0581 43.59404 291.2405 ]\n",
" [ 0. 0. 0. ... 296.0581 43.59404 291.2405 ]]], shape=(1, 300, 2100), dtype=float64)\n",
"tf.Tensor([7], shape=(1,), dtype=int32)\n",
"tf.Tensor(\n",
"[[[ 0. 0. 0. ... 340.4522 188.5802 153.4675]\n",
" [ 0. 0. 0. ... 342.0439 186.2218 158.3235]\n",
" [ 0. 0. 0. ... 343.4704 184.4892 161.9352]\n",
" ...\n",
" [ 0. 0. 0. ... 336.0501 100.8427 308.4322]\n",
" [ 0. 0. 0. ... 336.5646 102.0053 307.9174]\n",
" [ 0. 0. 0. ... 336.9454 102.9008 307.495 ]]], shape=(1, 300, 2100), dtype=float64)\n",
"tf.Tensor([7], shape=(1,), dtype=int32)\n",
"tf.Tensor(\n",
"[[[ 0. 0. 0. ... 296.0581 43.59404 291.2405 ]\n",
" [ 0. 0. 0. ... 318.9684 302.7743 264.226 ]\n",
" [ 0. 0. 0. ... 318.9684 302.7743 264.226 ]\n",
" ...\n",
" [ 0. 0. 0. ... 321.3094 67.3396 295.069 ]\n",
" [ 0. 0. 0. ... 321.406 66.64935 293.5298 ]\n",
" [ 0. 0. 0. ... 321.696 65.39925 291.8149 ]]], shape=(1, 300, 2100), dtype=float64)\n",
"tf.Tensor([7], shape=(1,), dtype=int32)\n"
]
}
],
"source": [
"for i,t in test_entry4['data']:\n",
" print(i)\n",
" print(t)"
]
},
{
"cell_type": "code",
"execution_count": 126,
"id": "bcec87a9",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"/opt/iui-datarelease3-sose2021/P14_ScenarioSorting_HeightNormalizationTrue_ArmNormalizationTrue_Repetition2.csv\n"
]
},
{
"data": {
"text/plain": [
"337"
]
},
"execution_count": 126,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"index = 1\n",
"entry = fil_dic_data[index]['data']\n",
"print(fil_dic_data[index]['filename'])\n",
"col_of_interst = []\n",
"for col in entry:\n",
" if 'float' in str(entry[col].dtype):\n",
" col_of_interst.append(col)\n",
"len(col_of_interst)"
]
},
{
"cell_type": "code",
"execution_count": 98,
"id": "fb10decc",
"metadata": {},
"outputs": [],
"source": [
"len_list = []\n",
"for i in dic_data:\n",
" len_list.append(len(i['data']))"
]
},
{
"cell_type": "code",
"execution_count": 110,
"id": "08ae9f52",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"count 384.000000\n",
"mean 3053.768229\n",
"std 2195.831831\n",
"min 597.000000\n",
"50% 2395.000000\n",
"90% 5977.000000\n",
"91% 6157.600000\n",
"92% 6239.600000\n",
"93% 6341.490000\n",
"94% 6585.200000\n",
"95% 7561.800000\n",
"96% 8158.000000\n",
"97% 8895.250000\n",
"98% 9942.320000\n",
"99% 10315.120000\n",
"max 19371.000000\n",
"dtype: float64"
]
},
"execution_count": 110,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"len_series = pd.Series(len_list, dtype='int64')\n",
"len_series.describe(percentiles=[x*0.01 for x in range(90,100)])"
]
},
{
"cell_type": "code",
"execution_count": 111,
"id": "57fee43e",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[<matplotlib.lines.Line2D at 0x7f0a6d98aa30>]"
]
},
"execution_count": 111,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAAsTAAALEwEAmpwYAAAgJUlEQVR4nO3deXxV9Z3/8dcne8hOFggQSGRHrYABt1qXKqKdkfbX0cK0v6q1daZTZ7Grjn10ZjrTdlpnOqOtU8eZqrWtC7XWUkVxqbZTHSBh3yGyZIGQkIQshKz3O3/cA15jMAFucu7yfj4e95Gzce/n5CRvTs75nu/XnHOIiEj0S/C7ABERCQ8FuohIjFCgi4jECAW6iEiMUKCLiMSIJL8+uKCgwJWWlvr18SIiUWndunVHnHOFg63zLdBLS0uprKz06+NFRKKSmR041TpdchERiREKdBGRGKFAFxGJEUMGupk9YmYNZrb1FOvNzB4wsyoz22xm88Nfp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dbF8zIHSAYEelmPsrdsZsvxd253tS5dczpL35+Q8YA0wzjl3yFtVD4zzpgcbaHvi+yyPdP8OfBUIePP5wFHnXJ83H7of7xpAHDgxgHg07nsZ0Ag86l1u+m8zyyDGj7tzrg74F6AaOETwGK4jPo75CeE6xhO96YHLw0KBfhbMLBP4JfA3zrm20HUu+N9vzLUJNbM/Ahqcc+v8rsUHSQT/FP+Rc24ecIzgn98nxeJx964XLyH4H9oEIANY7GtRPorkY6xAP0NmlkwwzH/unHvWW3zYzIq99cVAg7f8VANtD2cA7khzGXCjme0HniJ42eV+INeCA4TDu/fjVAOIR+O+1wK1zrk13vwzBAM+1o/7NcA+51yjc64XeJbgz0E8HPMTwnWM67zpgcvDQoF+Bry70j8Gdjjnvh+yKnSw7FsIXls/sfzT3h3xi4FW78+3VcAiM8vzzoIWecsilnPuHufcJOdcKcEbXr91zn0SeJ3gAOHw3n0fbADxFcBSr0VEGTCd4M2iiOWcqwdqzGymt+jDwHZi/7hXAxeb2RjvZ//Efsf8MQ8RlmPsrWszs4u97+WnQ97r7Pl98yEaX8AHCf7JtRnY6L1uIHid8DVgD/AqMNbb3oAHCd7V3wKUh7zXZ4Aq73Wb3/t2mt+HK3mnlcs5BH85q4BfAKne8jRvvspbf07Iv7/X+57sIox3+kd4n+cCld6xf45gC4aYP+7APwA7ga3ATwm2VInJYw48SfBeQS/Bv8puD+cxBsq97+PbwA8ZcJP9bF569F9EJEbokouISIxQoIuIxAgFuohIjFCgi4jECAW6iEiMUKCLiMQIBbqISIz4P/znqNGDJLV6AAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"from matplotlib import pyplot as plt\n",
"\n",
"l = []\n",
"ptiles = [x*0.01 for x in range(100)]\n",
"for i in ptiles:\n",
" l.append(len_series.quantile(i))\n",
"\n",
"plt.plot(l, ptiles)"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "69bd85a5",
"metadata": {},
"outputs": [],
"source": [
"def pplot(dd):\n",
" x = dd.shape[0]\n",
" fix = int(x/3)+1\n",
" fiy = 3\n",
" fig, axs = plt.subplots(fix, fiy, figsize=(3*fiy, 3*fix))\n",
" \n",
" for i in range(x):\n",
" axs[int(i/3)][i%3].plot(dd[i])\n",
" "
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "522518bc",
"metadata": {},
"outputs": [],
"source": [
"pplot(x['data'][2:12])"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
}
},
"nbformat": 4,
"nbformat_minor": 5
}