{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.13","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"none","dataSources":[{"sourceId":41880,"databundleVersionId":5677426,"sourceType":"competition"}],"dockerImageVersionId":30646,"isInternetEnabled":false,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"import os\nimport numpy as np \nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport glob\nfrom math import sqrt\n\nfrom sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score, roc_auc_score\nfrom sklearn.metrics import confusion_matrix, ConfusionMatrixDisplay\nfrom sklearn.model_selection import train_test_split, GridSearchCV, cross_val_score\nfrom sklearn.naive_bayes import GaussianNB\nfrom sklearn.svm import SVC\n\n\nimport lightgbm as lgb\nfrom lightgbm import LGBMClassifier\nfrom sklearn.metrics import roc_auc_score as ras \nfrom imblearn.over_sampling import SMOTE\nfrom sklearn.preprocessing import LabelEncoder\nimport itertools\nfrom itertools import *","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2024-03-01T09:26:20.080465Z","iopub.execute_input":"2024-03-01T09:26:20.081127Z","iopub.status.idle":"2024-03-01T09:26:26.215054Z","shell.execute_reply.started":"2024-03-01T09:26:20.081075Z","shell.execute_reply":"2024-03-01T09:26:26.212478Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"DATA_ROOT_DEFOG = '/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/train/defog/'\ndefog = pd.DataFrame()\nfor root, dirs, files in os.walk(DATA_ROOT_DEFOG):\n    for name in files:       \n        f = os.path.join(root, name)\n        df_list= pd.read_csv(f)\n        words = name.split('.')[0]\n        df_list['file']= name.split('.')[0]\n        defog = pd.concat([defog, df_list], axis=0)\n        \nkeys = np.arange(len(defog))\ndefog = defog.set_index(keys, drop=True, append=False, inplace=False, verify_integrity=True)\ndefog","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:32:14.103249Z","iopub.execute_input":"2024-02-20T09:32:14.103650Z","iopub.status.idle":"2024-02-20T09:32:37.432682Z","shell.execute_reply.started":"2024-02-20T09:32:14.103613Z","shell.execute_reply":"2024-02-20T09:32:37.431708Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"defog = defog.drop(['Valid','Task'], axis = 1)\ndefog","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:32:37.434207Z","iopub.execute_input":"2024-02-20T09:32:37.434509Z","iopub.status.idle":"2024-02-20T09:32:37.743641Z","shell.execute_reply.started":"2024-02-20T09:32:37.434484Z","shell.execute_reply":"2024-02-20T09:32:37.742259Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"defog['IsFOG'] = defog[['StartHesitation', 'Walking','Turn']].any(axis='columns')\nprint('\\n', defog[['Time','StartHesitation', 'Walking','Turn', 'IsFOG']][1047890:1071070])","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:32:37.746149Z","iopub.execute_input":"2024-02-20T09:32:37.746498Z","iopub.status.idle":"2024-02-20T09:32:37.981921Z","shell.execute_reply.started":"2024-02-20T09:32:37.746446Z","shell.execute_reply":"2024-02-20T09:32:37.979117Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# making sure there are no missing values:\nprint(len(defog['IsFOG'][defog['IsFOG']==0])+len(defog['IsFOG'][defog['IsFOG']==1]))\n\n# defining the beginings of each file/subj (defog has 91 files):\nsubj_start = (defog['Time'][defog['Time']==0])\nsubj_start_ind = np.array(subj_start.index)\nprint(len(subj_start_ind))\n# defining the ends of each file/subj (doesn't include the last one):\nsubj_end_ind = subj_start_ind[1:] - 1\nprint(len(subj_end_ind))\n\nprint('FOG event at head of subject number: ', np.where(defog['IsFOG'][subj_start_ind]==1))\n\nprint('FOG event at tail of subject number: ',np.where(defog['IsFOG'][subj_end_ind]==1))","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:32:37.984021Z","iopub.execute_input":"2024-02-20T09:32:37.984393Z","iopub.status.idle":"2024-02-20T09:32:38.838666Z","shell.execute_reply.started":"2024-02-20T09:32:37.984364Z","shell.execute_reply":"2024-02-20T09:32:38.837775Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"identify fogs","metadata":{}},{"cell_type":"code","source":"x = defog[['AccV','AccML','AccAP']]\ny = defog['IsFOG']","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:32:38.839654Z","iopub.execute_input":"2024-02-20T09:32:38.839931Z","iopub.status.idle":"2024-02-20T09:32:38.909583Z","shell.execute_reply.started":"2024-02-20T09:32:38.839910Z","shell.execute_reply":"2024-02-20T09:32:38.908420Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"y = defog['IsFOG']","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:32:38.910856Z","iopub.execute_input":"2024-02-20T09:32:38.911103Z","iopub.status.idle":"2024-02-20T09:32:38.917924Z","shell.execute_reply.started":"2024-02-20T09:32:38.911083Z","shell.execute_reply":"2024-02-20T09:32:38.916721Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"X_train, X_test, Y_train, Y_test_defog = train_test_split(x, y, test_size = 0.1, random_state = 1 )","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:32:38.919178Z","iopub.execute_input":"2024-02-20T09:32:38.919421Z","iopub.status.idle":"2024-02-20T09:32:41.022067Z","shell.execute_reply.started":"2024-02-20T09:32:38.919400Z","shell.execute_reply":"2024-02-20T09:32:41.021104Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Create LightGBM Datasets for training and validation \nx_train, x_val, y_train, y_val = train_test_split(X_train, Y_train, test_size = 0.1, random_state = 2 )\n\ntrain_data = lgb.Dataset(x_train, label=y_train) \ntest_data = lgb.Dataset(x_val, label=y_val, reference=train_data)  \n\n# Define hyperparameters and objective for LightGBM \nfog_params={\n    'objective': 'binary', #binary target feature\n    'metric': 'auc', \n    'boosting_type': 'gbdt',  #GradientBoostingDecisionTree\n    'learning_rate': 0.03,  \n    'verbose': 1,\n    'max_depth': 6,\n    'num_leaves': 50\n}","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:32:41.023292Z","iopub.execute_input":"2024-02-20T09:32:41.023578Z","iopub.status.idle":"2024-02-20T09:32:43.413603Z","shell.execute_reply.started":"2024-02-20T09:32:41.023554Z","shell.execute_reply":"2024-02-20T09:32:43.411900Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Training a LightGBM Model \nnum_round = 200\n\n\n# Train a LightGBM model using defined parameters, training data, and specified number of rounds \nfog_model = lgb.train(fog_params, train_data, \n                  num_round, valid_sets=[test_data]) ","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:32:43.418920Z","iopub.execute_input":"2024-02-20T09:32:43.420162Z","iopub.status.idle":"2024-02-20T09:34:20.696180Z","shell.execute_reply.started":"2024-02-20T09:32:43.420112Z","shell.execute_reply":"2024-02-20T09:34:20.694860Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"y_train_pred_defog = fog_model.predict(x_train)\ny_val_pred_defog = fog_model.predict(x_val)\ny_test_pred_defog = fog_model.predict(X_test)","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:20.697841Z","iopub.execute_input":"2024-02-20T09:34:20.698954Z","iopub.status.idle":"2024-02-20T09:34:58.742423Z","shell.execute_reply.started":"2024-02-20T09:34:20.698798Z","shell.execute_reply":"2024-02-20T09:34:58.737338Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Calculate and print the ROC-AUC scores\nprint(\"Training ROC-AUC: \", ras(y_train, y_train_pred_defog))\nprint(\"Validation ROC-AUC: \", ras(y_val, y_val_pred_defog)) \nprint(\"Test ROC-AUC: \", ras(Y_test_defog, y_test_pred_defog)) ","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.743901Z","iopub.status.idle":"2024-02-20T09:34:58.744376Z","shell.execute_reply.started":"2024-02-20T09:34:58.744156Z","shell.execute_reply":"2024-02-20T09:34:58.744174Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"secondary model ","metadata":{}},{"cell_type":"code","source":"# Adding additional features for each axis:\n# - rolling mean\n# - rolling standard deviation\n# - rolling maximum\n# - rolling minimum\n\nwindow_size = 200  # 2 seconds window for 100Hz sampling rate\n\n# Calculating rolling window features for each acceleration axis\nfor axis in ['AccV', 'AccML', 'AccAP']:\n    defog[f'{axis}_rolling_mean'] = defog[axis].rolling(window=window_size, min_periods=1).mean()\n    defog[f'{axis}_rolling_std'] = defog[axis].rolling(window=window_size, min_periods=1).std()\n    defog[f'{axis}_rolling_max'] = defog[axis].rolling(window=window_size, min_periods=1).max()\n    defog[f'{axis}_rolling_min'] = defog[axis].rolling(window=window_size, min_periods=1).min()\n\n# Drop rows that have NaN values which might be introduced by rolling window calculations\ndefog.dropna(inplace=True)\n\n","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.746032Z","iopub.status.idle":"2024-02-20T09:34:58.746421Z","shell.execute_reply.started":"2024-02-20T09:34:58.746241Z","shell.execute_reply":"2024-02-20T09:34:58.746257Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"defog2 = defog[defog['IsFOG'] == True]\ndefog2","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.748017Z","iopub.status.idle":"2024-02-20T09:34:58.748388Z","shell.execute_reply.started":"2024-02-20T09:34:58.748217Z","shell.execute_reply":"2024-02-20T09:34:58.748233Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Updating feature selection with rolling window features\nfeature_columns = ['AccV', 'AccML', 'AccAP', \n                   'AccV_rolling_mean', 'AccV_rolling_std', 'AccV_rolling_max', 'AccV_rolling_min',\n                   'AccML_rolling_mean', 'AccML_rolling_std', 'AccML_rolling_max', 'AccML_rolling_min',\n                   'AccAP_rolling_mean', 'AccAP_rolling_std', 'AccAP_rolling_max', 'AccAP_rolling_min']\n\nX = defog2[feature_columns]\n","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.749598Z","iopub.status.idle":"2024-02-20T09:34:58.750031Z","shell.execute_reply.started":"2024-02-20T09:34:58.749867Z","shell.execute_reply":"2024-02-20T09:34:58.749883Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# targets\ny_StartHesitation = defog2['StartHesitation']\ny_Turn = defog2['Turn']\ny_Walking = defog2['Walking']","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.751197Z","iopub.status.idle":"2024-02-20T09:34:58.751534Z","shell.execute_reply.started":"2024-02-20T09:34:58.751383Z","shell.execute_reply":"2024-02-20T09:34:58.751396Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def apply_smote(X, y):\n    smote = SMOTE(random_state=42)\n    X_smote, y_smote = smote.fit_resample(X, y)\n    return X_smote, y_smote","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.752842Z","iopub.status.idle":"2024-02-20T09:34:58.753183Z","shell.execute_reply.started":"2024-02-20T09:34:58.753028Z","shell.execute_reply":"2024-02-20T09:34:58.753042Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Splitting the data into training and testing sets for each target variable\nX_train, X_test_defog, y_train_StartHesitation, y_test_StartHesitation = train_test_split(X, y_StartHesitation, test_size=0.2, random_state=42)\n_, _, y_train_Turn, y_test_Turn = train_test_split(X, y_Turn, test_size=0.2, random_state=42)\n_, _, y_train_Walking, y_test_Walking = train_test_split(X, y_Walking, test_size=0.2, random_state=42)","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.755599Z","iopub.status.idle":"2024-02-20T09:34:58.756405Z","shell.execute_reply.started":"2024-02-20T09:34:58.756219Z","shell.execute_reply":"2024-02-20T09:34:58.756237Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# SMOTE to the training data for each target variable\nX_train_smote_StartHesitation, y_train_smote_StartHesitation = apply_smote(X_train, y_train_StartHesitation)\nX_train_smote_Turn, y_train_smote_Turn = apply_smote(X_train, y_train_Turn)\nX_train_smote_Walking, y_train_smote_Walking = apply_smote(X_train, y_train_Walking)\n","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.757502Z","iopub.status.idle":"2024-02-20T09:34:58.758220Z","shell.execute_reply.started":"2024-02-20T09:34:58.758044Z","shell.execute_reply":"2024-02-20T09:34:58.758061Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Initialize and train the LightGBM model for each target variable\nlgbm_StartHesitation = LGBMClassifier(objective='binary', random_state=42)\nlgbm_StartHesitation.fit(X_train_smote_StartHesitation, y_train_smote_StartHesitation)","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.759072Z","iopub.status.idle":"2024-02-20T09:34:58.760045Z","shell.execute_reply.started":"2024-02-20T09:34:58.759870Z","shell.execute_reply":"2024-02-20T09:34:58.759888Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"lgbm_Turn = LGBMClassifier(objective='binary', random_state=42)\nlgbm_Turn.fit(X_train_smote_Turn, y_train_smote_Turn)","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.761284Z","iopub.status.idle":"2024-02-20T09:34:58.762262Z","shell.execute_reply.started":"2024-02-20T09:34:58.762033Z","shell.execute_reply":"2024-02-20T09:34:58.762050Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"lgbm_Walking = LGBMClassifier(objective='binary', random_state=42)\nlgbm_Walking.fit(X_train_smote_Walking, y_train_smote_Walking)","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.763704Z","iopub.status.idle":"2024-02-20T09:34:58.764240Z","shell.execute_reply.started":"2024-02-20T09:34:58.764038Z","shell.execute_reply":"2024-02-20T09:34:58.764052Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Get probabilities for the positive class of each target\ny_pred_proba_StartHesitation_defog = lgbm_StartHesitation.predict_proba(X_test_defog)[:, 1]  \ny_pred_proba_Turn_defog = lgbm_Turn.predict_proba(X_test_defog)[:, 1]  \ny_pred_proba_Walking_defog = lgbm_Walking.predict_proba(X_test_defog)[:, 1]  ","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.765644Z","iopub.status.idle":"2024-02-20T09:34:58.766020Z","shell.execute_reply.started":"2024-02-20T09:34:58.765856Z","shell.execute_reply":"2024-02-20T09:34:58.765872Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Evaluate using ROC AUC for each target variable\nroc_auc_StartHesitation = roc_auc_score(y_test_StartHesitation, y_pred_proba_StartHesitation_defog)\nroc_auc_Turn = roc_auc_score(y_test_Turn, y_pred_proba_Turn_defog)\nroc_auc_Walking = roc_auc_score(y_test_Walking, y_pred_proba_Walking_defog)","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.767217Z","iopub.status.idle":"2024-02-20T09:34:58.767527Z","shell.execute_reply.started":"2024-02-20T09:34:58.767384Z","shell.execute_reply":"2024-02-20T09:34:58.767396Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"print(roc_auc_StartHesitation)\nprint(roc_auc_Turn)\nprint(roc_auc_Walking)","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.768560Z","iopub.status.idle":"2024-02-20T09:34:58.768899Z","shell.execute_reply.started":"2024-02-20T09:34:58.768731Z","shell.execute_reply":"2024-02-20T09:34:58.768743Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"TDCS separate model","metadata":{}},{"cell_type":"code","source":"# separate lgbm\nDATA_ROOT_TDCSFOG = '/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/train/tdcsfog/'\ntdcsfog = pd.DataFrame()\nfor root, dirs, files in os.walk(DATA_ROOT_TDCSFOG):\n    for name in files:       \n        f = os.path.join(root, name)\n        df_list= pd.read_csv(f)\n        words = name.split('.')[0]\n        df_list['file']= name.split('.')[0]\n        tdcsfog = pd.concat([tdcsfog, df_list], axis=0)\n        \nkeys = np.arange(len(tdcsfog))\ntdcsfog = tdcsfog.set_index(keys, drop=True, append=False, inplace=False, verify_integrity=True)\ntdcsfog","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.769826Z","iopub.status.idle":"2024-02-20T09:34:58.770120Z","shell.execute_reply.started":"2024-02-20T09:34:58.769983Z","shell.execute_reply":"2024-02-20T09:34:58.769994Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"tdcsfog['IsFOG'] = tdcsfog[['StartHesitation', 'Walking','Turn']].any(axis='columns')\nprint('\\n', tdcsfog[['Time','StartHesitation', 'Walking','Turn', 'IsFOG']][1047890:1071070])\n# making sure there are no missing values:\nprint(len(tdcsfog['IsFOG'][tdcsfog['IsFOG']==0])+len(tdcsfog['IsFOG'][tdcsfog['IsFOG']==1]))\n\n# defining the beginings of each file/subj (defog has 91 files):\nsubj_start = (tdcsfog['Time'][tdcsfog['Time']==0])\nsubj_start_ind = np.array(subj_start.index)\nprint(len(subj_start_ind))\n# defining the ends of each file/subj (doesn't include the last one):\nsubj_end_ind = subj_start_ind[1:] - 1\nprint(len(subj_end_ind))\n\nprint('FOG event at head of subject number: ', np.where(tdcsfog['IsFOG'][subj_start_ind]==1))\n\nprint('FOG event at tail of subject number: ',np.where(tdcsfog['IsFOG'][subj_end_ind]==1))","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.771517Z","iopub.status.idle":"2024-02-20T09:34:58.771910Z","shell.execute_reply.started":"2024-02-20T09:34:58.771693Z","shell.execute_reply":"2024-02-20T09:34:58.771707Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"x = tdcsfog[['AccV','AccML','AccAP']]\ny = tdcsfog['IsFOG']","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.773059Z","iopub.status.idle":"2024-02-20T09:34:58.773354Z","shell.execute_reply.started":"2024-02-20T09:34:58.773216Z","shell.execute_reply":"2024-02-20T09:34:58.773228Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"X_train, X_test, Y_train, Y_test_tdcs = train_test_split(x, y, test_size = 0.1, random_state = 1 )","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.774224Z","iopub.status.idle":"2024-02-20T09:34:58.774494Z","shell.execute_reply.started":"2024-02-20T09:34:58.774367Z","shell.execute_reply":"2024-02-20T09:34:58.774378Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Create LightGBM Datasets for training and validation \nx_train, x_val, y_train, y_val = train_test_split(X_train, Y_train, test_size = 0.1, random_state = 2 )\n\ntrain_data = lgb.Dataset(x_train, label=y_train) \ntest_data = lgb.Dataset(x_val, label=y_val, reference=train_data)  \n\n# Define hyperparameters and objective for LightGBM \nfog_params={\n    'objective': 'binary', #binary target feature\n    'metric': 'auc', \n    'boosting_type': 'gbdt',  #GradientBoostingDecisionTree\n    'learning_rate': 0.03,  \n    'verbose': 1,\n    'max_depth': 6,\n    'num_leaves': 50\n}","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.775223Z","iopub.status.idle":"2024-02-20T09:34:58.775495Z","shell.execute_reply.started":"2024-02-20T09:34:58.775364Z","shell.execute_reply":"2024-02-20T09:34:58.775376Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Training a LightGBM Model \nnum_round = 200\n\n\n# Train a LightGBM model using defined parameters, training data, and specified number of rounds \ntdcsfog_model = lgb.train(fog_params, train_data, \n                  num_round, valid_sets=[test_data]) ","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.776310Z","iopub.status.idle":"2024-02-20T09:34:58.776561Z","shell.execute_reply.started":"2024-02-20T09:34:58.776436Z","shell.execute_reply":"2024-02-20T09:34:58.776447Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"y_train_pred_tdcs = tdcsfog_model.predict(x_train)\ny_val_pred_tdcs = tdcsfog_model.predict(x_val)\ny_test_pred_tdcs = tdcsfog_model.predict(X_test)","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.778047Z","iopub.status.idle":"2024-02-20T09:34:58.778395Z","shell.execute_reply.started":"2024-02-20T09:34:58.778205Z","shell.execute_reply":"2024-02-20T09:34:58.778217Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\nprint(\"Training ROC-AUC: \", ras(y_train, y_train_pred_tdcs))\nprint(\"Validation ROC-AUC: \", ras(y_val, y_val_pred_tdcs)) \nprint(\"Test ROC-AUC: \", ras(Y_test_tdcs,y_test_pred_tdcs)) ","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.779228Z","iopub.status.idle":"2024-02-20T09:34:58.779497Z","shell.execute_reply.started":"2024-02-20T09:34:58.779370Z","shell.execute_reply":"2024-02-20T09:34:58.779380Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"window_size = 200  # 2 seconds window for 100Hz sampling rate\n\n# Calculating rolling window features for each acceleration axis\nfor axis in ['AccV', 'AccML', 'AccAP']:\n    tdcsfog[f'{axis}_rolling_mean'] = tdcsfog[axis].rolling(window=window_size, min_periods=1).mean()\n    tdcsfog[f'{axis}_rolling_std'] = tdcsfog[axis].rolling(window=window_size, min_periods=1).std()\n    tdcsfog[f'{axis}_rolling_max'] = tdcsfog[axis].rolling(window=window_size, min_periods=1).max()\n    tdcsfog[f'{axis}_rolling_min'] = tdcsfog[axis].rolling(window=window_size, min_periods=1).min()\n\n# Drop rows that have NaN values which might be introduced by rolling window calculations\ntdcsfog.dropna(inplace=True)\n","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.780312Z","iopub.status.idle":"2024-02-20T09:34:58.780587Z","shell.execute_reply.started":"2024-02-20T09:34:58.780454Z","shell.execute_reply":"2024-02-20T09:34:58.780465Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"tdcsfog2 = tdcsfog[tdcsfog['IsFOG'] == True]","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.781532Z","iopub.status.idle":"2024-02-20T09:34:58.781905Z","shell.execute_reply.started":"2024-02-20T09:34:58.781741Z","shell.execute_reply":"2024-02-20T09:34:58.781753Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Updating feature selection with rolling window features\nfeature_columns = ['AccV', 'AccML', 'AccAP', \n                   'AccV_rolling_mean', 'AccV_rolling_std', 'AccV_rolling_max', 'AccV_rolling_min',\n                   'AccML_rolling_mean', 'AccML_rolling_std', 'AccML_rolling_max', 'AccML_rolling_min',\n                   'AccAP_rolling_mean', 'AccAP_rolling_std', 'AccAP_rolling_max', 'AccAP_rolling_min']\n\nX = tdcsfog2[feature_columns]\n\n# targets\ny_StartHesitation = tdcsfog2['StartHesitation']\ny_Turn = tdcsfog2['Turn']\ny_Walking = tdcsfog2['Walking']","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.782787Z","iopub.status.idle":"2024-02-20T09:34:58.783116Z","shell.execute_reply.started":"2024-02-20T09:34:58.782973Z","shell.execute_reply":"2024-02-20T09:34:58.782985Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def apply_smote(X, y):\n    smote = SMOTE(random_state=42)\n    X_smote, y_smote = smote.fit_resample(X, y)\n    return X_smote, y_smote","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.784148Z","iopub.status.idle":"2024-02-20T09:34:58.784491Z","shell.execute_reply.started":"2024-02-20T09:34:58.784302Z","shell.execute_reply":"2024-02-20T09:34:58.784354Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Splitting the data into training and testing sets for each target variable\nX_train, X_test_tdcs, y_train_StartHesitation, y_test_StartHesitation = train_test_split(X, y_StartHesitation, test_size=0.2, random_state=42)\n_, _, y_train_Turn, y_test_Turn = train_test_split(X, y_Turn, test_size=0.2, random_state=42)\n_, _, y_train_Walking, y_test_Walking = train_test_split(X, y_Walking, test_size=0.2, random_state=42)","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.785599Z","iopub.status.idle":"2024-02-20T09:34:58.785993Z","shell.execute_reply.started":"2024-02-20T09:34:58.785837Z","shell.execute_reply":"2024-02-20T09:34:58.785850Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# SMOTE to the training data for each target variable\nX_train_smote_StartHesitation, y_train_smote_StartHesitation = apply_smote(X_train, y_train_StartHesitation)\nX_train_smote_Turn, y_train_smote_Turn = apply_smote(X_train, y_train_Turn)\nX_train_smote_Walking, y_train_smote_Walking = apply_smote(X_train, y_train_Walking)","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.787035Z","iopub.status.idle":"2024-02-20T09:34:58.787313Z","shell.execute_reply.started":"2024-02-20T09:34:58.787180Z","shell.execute_reply":"2024-02-20T09:34:58.787191Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"separate lgmbs per event","metadata":{}},{"cell_type":"code","source":"lgbm_StartHesitation = LGBMClassifier(objective='binary',\n                            random_state=42)\nlgbm_StartHesitation.fit(X_train_smote_StartHesitation, y_train_smote_StartHesitation)","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"lgbm_Turn = LGBMClassifier(objective='binary',\n                            random_state=42)\nlgbm_Turn.fit(X_train_smote_Turn, y_train_smote_Turn)","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.789204Z","iopub.status.idle":"2024-02-20T09:34:58.789852Z","shell.execute_reply.started":"2024-02-20T09:34:58.789498Z","shell.execute_reply":"2024-02-20T09:34:58.789519Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"lgbm_Walking = LGBMClassifier(objective='binary', random_state=42)\nlgbm_Walking.fit(X_train_smote_Walking, y_train_smote_Walking)","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.791564Z","iopub.status.idle":"2024-02-20T09:34:58.792004Z","shell.execute_reply.started":"2024-02-20T09:34:58.791795Z","shell.execute_reply":"2024-02-20T09:34:58.791831Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Get probabilities for the positive class of each target\ny_pred_proba_StartHesitation_tdcs = lgbm_StartHesitation.predict_proba(X_test_tdcs)[:, 1]  \ny_pred_proba_Turn_tdcs = lgbm_Turn.predict_proba(X_test_tdcs)[:, 1]  \ny_pred_proba_Walking_tdcs = lgbm_Walking.predict_proba(X_test_tdcs)[:, 1]  ","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.793831Z","iopub.status.idle":"2024-02-20T09:34:58.794375Z","shell.execute_reply.started":"2024-02-20T09:34:58.794137Z","shell.execute_reply":"2024-02-20T09:34:58.794157Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Calculate and print the ROC-AUC scores\nprint(\"Training ROC-AUC: \", ras(y_train, y_train_pred_tdcs))\nprint(\"Validation ROC-AUC: \", ras(y_val, y_val_pred_tdcs)) \nprint(\"Test ROC-AUC: \", ras(Y_test_tdcs,y_test_pred_tdcs)) ","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.797627Z","iopub.status.idle":"2024-02-20T09:34:58.797987Z","shell.execute_reply.started":"2024-02-20T09:34:58.797825Z","shell.execute_reply":"2024-02-20T09:34:58.797838Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"actual submission ","metadata":{}},{"cell_type":"code","source":"TEST_ROOT_DEFOG = '/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/test/defog/'\ntest_defog = pd.DataFrame()\nfor root, dirs, files in os.walk(TEST_ROOT_DEFOG):\n    for name in files:       \n        f = os.path.join(root, name)\n        df_list= pd.read_csv(f)\n        words = name.split('.')[0]\n        df_list['file']= name.split('.')[0]\n        test_defog = pd.concat([test_defog, df_list], axis=0)\n        \nkeys = np.arange(len(test_defog))\ntest_defog = test_defog.set_index(keys, drop=True, append=False, inplace=False, verify_integrity=True)\ntest_defog","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.805231Z","iopub.status.idle":"2024-02-20T09:34:58.805639Z","shell.execute_reply.started":"2024-02-20T09:34:58.805469Z","shell.execute_reply":"2024-02-20T09:34:58.805484Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_defog['Id'] = test_defog['file'] + '_' + test_defog['Time'].astype('str')\ntest_defog = test_defog.drop(['file'], axis = 1)\ntest_defog","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.809136Z","iopub.status.idle":"2024-02-20T09:34:58.809604Z","shell.execute_reply.started":"2024-02-20T09:34:58.809421Z","shell.execute_reply":"2024-02-20T09:34:58.809437Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_defog_df = test_defog.drop(['Time','Id'], axis = 1)\ntest_defog_df","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.810672Z","iopub.status.idle":"2024-02-20T09:34:58.811080Z","shell.execute_reply.started":"2024-02-20T09:34:58.810932Z","shell.execute_reply":"2024-02-20T09:34:58.810945Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#add pred column \ndefog_pred_fog = fog_model.predict(test_defog_df)\ntest_defog['FogProb'] = defog_pred_fog\ntest_defog","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.812385Z","iopub.status.idle":"2024-02-20T09:34:58.812939Z","shell.execute_reply.started":"2024-02-20T09:34:58.812641Z","shell.execute_reply":"2024-02-20T09:34:58.812661Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"window_size = 200  # 2 seconds window for 100Hz sampling rate\n\n# Calculating rolling window features for each acceleration axis\nfor axis in ['AccV', 'AccML', 'AccAP']:\n    test_defog[f'{axis}_rolling_mean'] = test_defog[axis].rolling(window=window_size, min_periods=1).mean()\n    test_defog[f'{axis}_rolling_std'] = test_defog[axis].rolling(window=window_size, min_periods=1).std()\n    test_defog[f'{axis}_rolling_max'] = test_defog[axis].rolling(window=window_size, min_periods=1).max()\n    test_defog[f'{axis}_rolling_min'] = test_defog[axis].rolling(window=window_size, min_periods=1).min()","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.815085Z","iopub.status.idle":"2024-02-20T09:34:58.815398Z","shell.execute_reply.started":"2024-02-20T09:34:58.815256Z","shell.execute_reply":"2024-02-20T09:34:58.815268Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Updating feature selection with rolling window features\nfeature_columns = ['AccV', 'AccML', 'AccAP', \n                   'AccV_rolling_mean', 'AccV_rolling_std', 'AccV_rolling_max', 'AccV_rolling_min',\n                   'AccML_rolling_mean', 'AccML_rolling_std', 'AccML_rolling_max', 'AccML_rolling_min',\n                   'AccAP_rolling_mean', 'AccAP_rolling_std', 'AccAP_rolling_max', 'AccAP_rolling_min']\n\nX = test_defog[feature_columns]","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.816036Z","iopub.status.idle":"2024-02-20T09:34:58.816329Z","shell.execute_reply.started":"2024-02-20T09:34:58.816193Z","shell.execute_reply":"2024-02-20T09:34:58.816205Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_defog_SH_pred =lgbm_StartHesitation.predict(X)\ntest_defog_T_pred = lgbm_Turn.predict(X)\ntest_defog_W_pred = lgbm_Walking.predict(X)\n\n","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.816960Z","iopub.status.idle":"2024-02-20T09:34:58.817250Z","shell.execute_reply.started":"2024-02-20T09:34:58.817112Z","shell.execute_reply":"2024-02-20T09:34:58.817123Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_defog['StartHesitation'] = np.sqrt(test_defog_SH_pred * defog_pred_fog)\ntest_defog['Turn'] = np.sqrt(test_defog_T_pred * defog_pred_fog)\ntest_defog['Walking'] = np.sqrt(test_defog_W_pred * defog_pred_fog)","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.818633Z","iopub.status.idle":"2024-02-20T09:34:58.819005Z","shell.execute_reply.started":"2024-02-20T09:34:58.818863Z","shell.execute_reply":"2024-02-20T09:34:58.818876Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"subm = test_defog[['Id','StartHesitation','Turn','Walking']]","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.819876Z","iopub.status.idle":"2024-02-20T09:34:58.820158Z","shell.execute_reply.started":"2024-02-20T09:34:58.820026Z","shell.execute_reply":"2024-02-20T09:34:58.820038Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"TEST_ROOT_TDCS= '/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/test/tdcsfog/'\ntest_tdcs = pd.DataFrame()\nfor root, dirs, files in os.walk(TEST_ROOT_TDCS):\n    for name in files:       \n        f = os.path.join(root, name)\n        df_list= pd.read_csv(f)\n        words = name.split('.')[0]\n        df_list['file']= name.split('.')[0]\n        test_tdcs = pd.concat([test_tdcs, df_list], axis=0)\n        \nkeys = np.arange(len(test_tdcs))\ntest_tdcs = test_tdcs.set_index(keys, drop=True, append=False, inplace=False, verify_integrity=True)\ntest_tdcs","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.821004Z","iopub.status.idle":"2024-02-20T09:34:58.821286Z","shell.execute_reply.started":"2024-02-20T09:34:58.821148Z","shell.execute_reply":"2024-02-20T09:34:58.821160Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_tdcs['Id'] = test_tdcs['file'] + '_' + test_tdcs['Time'].astype('str')\ntest_tdcs = test_tdcs.drop(['file'], axis = 1)\ntest_tdcs","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.822151Z","iopub.status.idle":"2024-02-20T09:34:58.822453Z","shell.execute_reply.started":"2024-02-20T09:34:58.822307Z","shell.execute_reply":"2024-02-20T09:34:58.822319Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_tdcs_df = test_tdcs.drop(['Time','Id'], axis = 1)\ntest_tdcs_df","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.823313Z","iopub.status.idle":"2024-02-20T09:34:58.823628Z","shell.execute_reply.started":"2024-02-20T09:34:58.823495Z","shell.execute_reply":"2024-02-20T09:34:58.823507Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# using separate tdcs\ntdcs_pred_fog = tdcsfog_model.predict(test_tdcs_df)","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.824437Z","iopub.status.idle":"2024-02-20T09:34:58.824711Z","shell.execute_reply.started":"2024-02-20T09:34:58.824572Z","shell.execute_reply":"2024-02-20T09:34:58.824583Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_tdcs['FogProb'] = tdcs_pred_fog\ntest_tdcs","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.825491Z","iopub.status.idle":"2024-02-20T09:34:58.825765Z","shell.execute_reply.started":"2024-02-20T09:34:58.825626Z","shell.execute_reply":"2024-02-20T09:34:58.825637Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"window_size = 200  # 2 seconds window for 100Hz sampling rate\n\n# Calculating rolling window features for each acceleration axis\nfor axis in ['AccV', 'AccML', 'AccAP']:\n    test_tdcs[f'{axis}_rolling_mean'] = test_tdcs[axis].rolling(window=window_size, min_periods=1).mean()\n    test_tdcs[f'{axis}_rolling_std'] = test_tdcs[axis].rolling(window=window_size, min_periods=1).std()\n    test_tdcs[f'{axis}_rolling_max'] = test_tdcs[axis].rolling(window=window_size, min_periods=1).max()\n    test_tdcs[f'{axis}_rolling_min'] = test_tdcs[axis].rolling(window=window_size, min_periods=1).min()\ntest_tdcs","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.826904Z","iopub.status.idle":"2024-02-20T09:34:58.827183Z","shell.execute_reply.started":"2024-02-20T09:34:58.827048Z","shell.execute_reply":"2024-02-20T09:34:58.827060Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Updating feature selection with rolling window features\nfeature_columns = ['AccV', 'AccML', 'AccAP', \n                   'AccV_rolling_mean', 'AccV_rolling_std', 'AccV_rolling_max', 'AccV_rolling_min',\n                   'AccML_rolling_mean', 'AccML_rolling_std', 'AccML_rolling_max', 'AccML_rolling_min',\n                   'AccAP_rolling_mean', 'AccAP_rolling_std', 'AccAP_rolling_max', 'AccAP_rolling_min']\n\nX = test_tdcs[feature_columns]","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.828029Z","iopub.status.idle":"2024-02-20T09:34:58.828291Z","shell.execute_reply.started":"2024-02-20T09:34:58.828155Z","shell.execute_reply":"2024-02-20T09:34:58.828167Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_tdcs_SH_pred = lgbm_StartHesitation.predict(X)\ntest_tdcs_T_pred = lgbm_Turn.predict(X)\ntest_tdcs_W_pred = lgbm_Walking.predict(X)","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.828962Z","iopub.status.idle":"2024-02-20T09:34:58.829232Z","shell.execute_reply.started":"2024-02-20T09:34:58.829098Z","shell.execute_reply":"2024-02-20T09:34:58.829109Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_tdcs['StartHesitation'] = np.sqrt(test_tdcs_SH_pred * tdcs_pred_fog)\ntest_tdcs['Turn'] = np.sqrt(test_tdcs_T_pred * tdcs_pred_fog)\ntest_tdcs['Walking'] = np.sqrt(test_tdcs_W_pred * tdcs_pred_fog)","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.830341Z","iopub.status.idle":"2024-02-20T09:34:58.830617Z","shell.execute_reply.started":"2024-02-20T09:34:58.830486Z","shell.execute_reply":"2024-02-20T09:34:58.830498Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"subm2 = test_tdcs[['Id','StartHesitation','Turn','Walking']]","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.831885Z","iopub.status.idle":"2024-02-20T09:34:58.832159Z","shell.execute_reply.started":"2024-02-20T09:34:58.832028Z","shell.execute_reply":"2024-02-20T09:34:58.832040Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"subm2","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.833057Z","iopub.status.idle":"2024-02-20T09:34:58.833337Z","shell.execute_reply.started":"2024-02-20T09:34:58.833198Z","shell.execute_reply":"2024-02-20T09:34:58.833211Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"subm_final = pd.concat([subm, subm2], ignore_index=True)","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.834338Z","iopub.status.idle":"2024-02-20T09:34:58.834610Z","shell.execute_reply.started":"2024-02-20T09:34:58.834481Z","shell.execute_reply":"2024-02-20T09:34:58.834492Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"subm_final.to_csv(\"submission.csv\",index=False)","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.836326Z","iopub.status.idle":"2024-02-20T09:34:58.836629Z","shell.execute_reply.started":"2024-02-20T09:34:58.836488Z","shell.execute_reply":"2024-02-20T09:34:58.836501Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"subm_final","metadata":{"execution":{"iopub.status.busy":"2024-02-20T09:34:58.837366Z","iopub.status.idle":"2024-02-20T09:34:58.837633Z","shell.execute_reply.started":"2024-02-20T09:34:58.837506Z","shell.execute_reply":"2024-02-20T09:34:58.837517Z"},"trusted":true},"execution_count":null,"outputs":[]}]}