{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"## Shoutout to @samuel and @chazzer for the first part of the problem; preprocessing data, data wrangling, and feature enineering. Couldn't have done this without your clever data wrangling skills! These stages of the problem are not mine, full credit goes to these two:\n- https://www.kaggle.com/code/chazzer/rocket-league-xgboost-feat-engineering-cv\n- https://www.kaggle.com/competitions/tabular-playground-series-oct-2022/discussion/356852","metadata":{}},{"cell_type":"markdown","source":"## Importing libraries","metadata":{}},{"cell_type":"code","source":"import numpy as np\nimport pandas as pd\nimport os\nimport gc\nimport matplotlib.pyplot as plt\nfrom tensorflow.config import list_physical_devices\nimport tensorflow as tf","metadata":{"execution":{"iopub.status.busy":"2022-10-11T22:43:05.788424Z","iopub.execute_input":"2022-10-11T22:43:05.788993Z","iopub.status.idle":"2022-10-11T22:43:11.816706Z","shell.execute_reply.started":"2022-10-11T22:43:05.788871Z","shell.execute_reply":"2022-10-11T22:43:11.815009Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Hyperparams","metadata":{"execution":{"iopub.status.busy":"2022-10-11T17:22:32.755080Z","iopub.execute_input":"2022-10-11T17:22:32.755751Z","iopub.status.idle":"2022-10-11T17:22:32.761094Z","shell.execute_reply.started":"2022-10-11T17:22:32.755713Z","shell.execute_reply":"2022-10-11T17:22:32.759925Z"}}},{"cell_type":"code","source":"SAMPLE = 0.2\nSEED = 42\nDEBUG = False","metadata":{"execution":{"iopub.status.busy":"2022-10-11T22:43:11.818669Z","iopub.execute_input":"2022-10-11T22:43:11.819575Z","iopub.status.idle":"2022-10-11T22:43:11.824580Z","shell.execute_reply.started":"2022-10-11T22:43:11.819545Z","shell.execute_reply":"2022-10-11T22:43:11.823328Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Data wrangling\n\n\"Because of memory limitations, we can't use all of the data from the 10 train .csv files.\nInstead, we'll get a random sample of each file (for now I'm experimenting with 20-33% sample size), and combine these samples into a unique training dataset.\" - chazzer. A great way to get around the problem of memory!","metadata":{}},{"cell_type":"code","source":"for dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))","metadata":{"execution":{"iopub.status.busy":"2022-10-11T22:43:11.825768Z","iopub.execute_input":"2022-10-11T22:43:11.826163Z","iopub.status.idle":"2022-10-11T22:43:11.846274Z","shell.execute_reply.started":"2022-10-11T22:43:11.826129Z","shell.execute_reply":"2022-10-11T22:43:11.843951Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"%%time\ncol_dtypes = {\n    'game_num': 'int8', 'event_id': 'int8', 'event_time': 'float16',\n    'ball_pos_x': 'float16', 'ball_pos_y': 'float16', 'ball_pos_z': 'float16',\n    'ball_vel_x': 'float16', 'ball_vel_y': 'float16', 'ball_vel_z': 'float16',\n    'p0_pos_x': 'float16', 'p0_pos_y': 'float16', 'p0_pos_z': 'float16',\n    'p0_vel_x': 'float16', 'p0_vel_y': 'float16', 'p0_vel_z': 'float16',\n    'p0_boost': 'float16', 'p1_pos_x': 'float16', 'p1_pos_y': 'float16',\n    'p1_pos_z': 'float16', 'p1_vel_x': 'float16', 'p1_vel_y': 'float16',\n    'p1_vel_z': 'float16', 'p1_boost': 'float16', 'p2_pos_x': 'float16',\n    'p2_pos_y': 'float16', 'p2_pos_z': 'float16', 'p2_vel_x': 'float16',\n    'p2_vel_y': 'float16', 'p2_vel_z': 'float16', 'p2_boost': 'float16',\n    'p3_pos_x': 'float16', 'p3_pos_y': 'float16', 'p3_pos_z': 'float16',\n    'p3_vel_x': 'float16', 'p3_vel_y': 'float16', 'p3_vel_z': 'float16',\n    'p3_boost': 'float16', 'p4_pos_x': 'float16', 'p4_pos_y': 'float16',\n    'p4_pos_z': 'float16', 'p4_vel_x': 'float16', 'p4_vel_y': 'float16',\n    'p4_vel_z': 'float16', 'p4_boost': 'float16', 'p5_pos_x': 'float16',\n    'p5_pos_y': 'float16', 'p5_pos_z': 'float16', 'p5_vel_x': 'float16',\n    'p5_vel_y': 'float16', 'p5_vel_z': 'float16', 'p5_boost': 'float16',\n    'boost0_timer': 'float16', 'boost1_timer': 'float16', 'boost2_timer': 'float16',\n    'boost3_timer': 'float16', 'boost4_timer': 'float16', 'boost5_timer': 'float16',\n    'player_scoring_next': 'O', 'team_scoring_next': 'O', 'team_A_scoring_within_10sec': 'O',\n    'team_B_scoring_within_10sec': 'O'\n}\ncols = list(col_dtypes.keys())\n\npath_to_data = '../input/tabular-playground-series-oct-2022'\ndf = pd.DataFrame({}, columns=cols)\nfor i in range(10):\n    df_tmp = pd.read_csv(f'{path_to_data}/train_{i}.csv', dtype=col_dtypes)\n    if SAMPLE < 1:\n        df_tmp = df_tmp.sample(frac=SAMPLE, random_state=SEED)\n        \n    df = pd.concat([df, df_tmp])\n    del df_tmp\n    gc.collect()\n    if DEBUG:\n        break","metadata":{"execution":{"iopub.status.busy":"2022-10-11T22:43:11.849560Z","iopub.execute_input":"2022-10-11T22:43:11.849932Z","iopub.status.idle":"2022-10-11T22:47:38.715869Z","shell.execute_reply.started":"2022-10-11T22:43:11.849866Z","shell.execute_reply":"2022-10-11T22:47:38.714888Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df","metadata":{"execution":{"iopub.status.busy":"2022-10-11T22:47:38.717246Z","iopub.execute_input":"2022-10-11T22:47:38.718224Z","iopub.status.idle":"2022-10-11T22:47:40.608119Z","shell.execute_reply.started":"2022-10-11T22:47:38.718187Z","shell.execute_reply":"2022-10-11T22:47:40.606829Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"type(df)","metadata":{"execution":{"iopub.status.busy":"2022-10-11T22:47:40.609804Z","iopub.execute_input":"2022-10-11T22:47:40.611023Z","iopub.status.idle":"2022-10-11T22:47:40.618716Z","shell.execute_reply.started":"2022-10-11T22:47:40.610981Z","shell.execute_reply":"2022-10-11T22:47:40.616943Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## One big advantage of this is that now our train distribution looks pretty simillar to the test data distribution","metadata":{}},{"cell_type":"markdown","source":"## Applying euclidean norm (feature engineering steps from samuel/chazzer). This is not my work, full credit of this phase goes to:\n- https://www.kaggle.com/competitions/tabular-playground-series-oct-2022/discussion/356852","metadata":{}},{"cell_type":"code","source":"def euclidian_norm(x):\n    return np.linalg.norm(x, axis=1)","metadata":{"execution":{"iopub.status.busy":"2022-10-11T22:47:40.620621Z","iopub.execute_input":"2022-10-11T22:47:40.621023Z","iopub.status.idle":"2022-10-11T22:47:40.639300Z","shell.execute_reply.started":"2022-10-11T22:47:40.620982Z","shell.execute_reply":"2022-10-11T22:47:40.636942Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# let's group the x, y and z variables by player and ball categories\n# this simplifies the code for the euclidian norm calculation\nvel_groups = {\n    f\"{el}_vel\": [f'{el}_vel_x', f'{el}_vel_y', f'{el}_vel_z']\n    for el in ['ball'] + [f'p{i}' for i in range(6)]\n}\npos_groups = {\n    f\"{el}_pos\": [f'{el}_pos_x', f'{el}_pos_y', f'{el}_pos_z']\n    for el in ['ball'] + [f'p{i}' for i in range(6)]\n}\npos_groups","metadata":{"execution":{"iopub.status.busy":"2022-10-11T22:47:40.641680Z","iopub.execute_input":"2022-10-11T22:47:40.642187Z","iopub.status.idle":"2022-10-11T22:47:40.660584Z","shell.execute_reply.started":"2022-10-11T22:47:40.642143Z","shell.execute_reply":"2022-10-11T22:47:40.658563Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# velocity magnitude\nfor col, vec in vel_groups.items():\n    df[col] = euclidian_norm(df[vec])","metadata":{"execution":{"iopub.status.busy":"2022-10-11T22:47:40.662811Z","iopub.execute_input":"2022-10-11T22:47:40.663590Z","iopub.status.idle":"2022-10-11T22:47:45.588581Z","shell.execute_reply.started":"2022-10-11T22:47:40.663541Z","shell.execute_reply":"2022-10-11T22:47:45.587286Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# distance from ball\nfor col, vec in pos_groups.items():\n    df[col + \"_ball_dist\"] = euclidian_norm(df[vec].values - df[pos_groups[\"ball_pos\"]].values)","metadata":{"execution":{"iopub.status.busy":"2022-10-11T22:47:45.592271Z","iopub.execute_input":"2022-10-11T22:47:45.593404Z","iopub.status.idle":"2022-10-11T22:47:50.361493Z","shell.execute_reply.started":"2022-10-11T22:47:45.593373Z","shell.execute_reply":"2022-10-11T22:47:50.359927Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Dropping columns that are not important and filling null values","metadata":{}},{"cell_type":"code","source":"cols_to_drop = [\n    'game_num', 'event_id', 'event_time', 'player_scoring_next', 'team_scoring_next', 'ball_pos_ball_dist'\n]","metadata":{"execution":{"iopub.status.busy":"2022-10-11T22:47:50.363209Z","iopub.execute_input":"2022-10-11T22:47:50.363562Z","iopub.status.idle":"2022-10-11T22:47:50.370637Z","shell.execute_reply.started":"2022-10-11T22:47:50.363509Z","shell.execute_reply":"2022-10-11T22:47:50.369515Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df = df.drop(columns=cols_to_drop)","metadata":{"execution":{"iopub.status.busy":"2022-10-11T22:47:50.372282Z","iopub.execute_input":"2022-10-11T22:47:50.372599Z","iopub.status.idle":"2022-10-11T22:47:51.172414Z","shell.execute_reply.started":"2022-10-11T22:47:50.372573Z","shell.execute_reply":"2022-10-11T22:47:51.171232Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df = df.dropna(axis=0)\n#df","metadata":{"execution":{"iopub.status.busy":"2022-10-11T22:47:51.173774Z","iopub.execute_input":"2022-10-11T22:47:51.174174Z","iopub.status.idle":"2022-10-11T22:47:54.908330Z","shell.execute_reply.started":"2022-10-11T22:47:51.174144Z","shell.execute_reply":"2022-10-11T22:47:54.906767Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Preprocessing test data","metadata":{}},{"cell_type":"code","source":"df_test = pd.read_csv('/kaggle/input/tabular-playground-series-oct-2022/test.csv')\n#df_test","metadata":{"execution":{"iopub.status.busy":"2022-10-11T22:47:54.909831Z","iopub.execute_input":"2022-10-11T22:47:54.910537Z","iopub.status.idle":"2022-10-11T22:48:03.186440Z","shell.execute_reply.started":"2022-10-11T22:47:54.910494Z","shell.execute_reply":"2022-10-11T22:48:03.184862Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def preprocess(df):\n    # velocity magnitude\n    for col, vec in vel_groups.items():\n        df[col] = euclidian_norm(df[vec])\n    \n    # ball distance\n    for col, vec in pos_groups.items():\n        df[col + \"_ball_dist\"] = euclidian_norm(df[vec].values - df[pos_groups[\"ball_pos\"]].values)\n    \n    df = df.drop(columns=['ball_pos_ball_dist'])\n    \n    return df","metadata":{"execution":{"iopub.status.busy":"2022-10-11T22:48:03.188654Z","iopub.execute_input":"2022-10-11T22:48:03.189216Z","iopub.status.idle":"2022-10-11T22:48:03.196825Z","shell.execute_reply.started":"2022-10-11T22:48:03.189173Z","shell.execute_reply":"2022-10-11T22:48:03.194942Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_test = preprocess(df_test).drop(columns=['id'])\n#df_test","metadata":{"execution":{"iopub.status.busy":"2022-10-11T22:48:03.198831Z","iopub.execute_input":"2022-10-11T22:48:03.199961Z","iopub.status.idle":"2022-10-11T22:48:05.061931Z","shell.execute_reply.started":"2022-10-11T22:48:03.199917Z","shell.execute_reply":"2022-10-11T22:48:05.060448Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Final train and test datasets. Important note, no validation set will be used for this problem.","metadata":{"execution":{"iopub.status.busy":"2022-10-11T17:57:51.111486Z","iopub.execute_input":"2022-10-11T17:57:51.112106Z","iopub.status.idle":"2022-10-11T17:57:51.136533Z","shell.execute_reply.started":"2022-10-11T17:57:51.111969Z","shell.execute_reply":"2022-10-11T17:57:51.135346Z"}}},{"cell_type":"code","source":"df","metadata":{"execution":{"iopub.status.busy":"2022-10-11T22:48:05.063777Z","iopub.execute_input":"2022-10-11T22:48:05.064593Z","iopub.status.idle":"2022-10-11T22:48:05.430453Z","shell.execute_reply.started":"2022-10-11T22:48:05.064550Z","shell.execute_reply":"2022-10-11T22:48:05.428726Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#y_train = np.array(df.loc[:,df.columns == 'team_A_scoring_within_10sec'], dtype=float)\n#x_train = np.array(df.drop(['team_A_scoring_within_10sec', 'team_B_scoring_within_10sec'], axis=1),dtype=float)\n\ny_train_a = np.array(df.loc[:,df.columns == 'team_A_scoring_within_10sec'], dtype=float)\nx_train = np.array(df.drop(['team_A_scoring_within_10sec', 'team_B_scoring_within_10sec'], axis=1),dtype=float)\n\ny_train_b = np.array(df.loc[:,df.columns == 'team_B_scoring_within_10sec'], dtype=float)\ndel df","metadata":{"execution":{"iopub.status.busy":"2022-10-11T22:48:05.432797Z","iopub.execute_input":"2022-10-11T22:48:05.433453Z","iopub.status.idle":"2022-10-11T22:48:09.443900Z","shell.execute_reply.started":"2022-10-11T22:48:05.433396Z","shell.execute_reply":"2022-10-11T22:48:09.442299Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Creating a model with a simple DNN for team A probability for scoring","metadata":{}},{"cell_type":"code","source":"model_a = tf.keras.models.Sequential([\n    tf.keras.layers.Dense(32,activation='relu',input_shape = (67,)),\n    tf.keras.layers.Dense(64,activation='relu'),\n    tf.keras.layers.Dense(128,activation='relu'),\n    tf.keras.layers.Dense(1,activation='sigmoid')\n    ])\n    \nmodel_a.compile(loss=tf.keras.losses.BinaryCrossentropy(),\n              optimizer=tf.keras.optimizers.Adam(),\n              metrics = ['acc'])\n\nhistory_a = model_a.fit(x_train,\n                    y_train_a,\n                    epochs=3)","metadata":{"execution":{"iopub.status.busy":"2022-10-11T22:48:09.445857Z","iopub.execute_input":"2022-10-11T22:48:09.446358Z","iopub.status.idle":"2022-10-11T23:04:48.553361Z","shell.execute_reply.started":"2022-10-11T22:48:09.446329Z","shell.execute_reply":"2022-10-11T23:04:48.552340Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"history_a.model.summary()","metadata":{"execution":{"iopub.status.busy":"2022-10-11T23:04:48.555027Z","iopub.execute_input":"2022-10-11T23:04:48.556326Z","iopub.status.idle":"2022-10-11T23:04:48.562527Z","shell.execute_reply.started":"2022-10-11T23:04:48.556291Z","shell.execute_reply":"2022-10-11T23:04:48.561625Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"submission_a = history_a.model.predict(df_test)","metadata":{"execution":{"iopub.status.busy":"2022-10-11T23:27:13.578614Z","iopub.execute_input":"2022-10-11T23:27:13.579835Z","iopub.status.idle":"2022-10-11T23:27:44.736653Z","shell.execute_reply.started":"2022-10-11T23:27:13.579758Z","shell.execute_reply":"2022-10-11T23:27:44.735738Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"submission_a","metadata":{"execution":{"iopub.status.busy":"2022-10-11T23:04:48.794851Z","iopub.status.idle":"2022-10-11T23:04:48.795871Z","shell.execute_reply.started":"2022-10-11T23:04:48.795685Z","shell.execute_reply":"2022-10-11T23:04:48.795709Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"submission_a.shape","metadata":{"execution":{"iopub.status.busy":"2022-10-11T23:27:44.738228Z","iopub.execute_input":"2022-10-11T23:27:44.739104Z","iopub.status.idle":"2022-10-11T23:27:44.745304Z","shell.execute_reply.started":"2022-10-11T23:27:44.739069Z","shell.execute_reply":"2022-10-11T23:27:44.744336Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## I've gotten a lot of memory issues, so these variables will be deleted","metadata":{}},{"cell_type":"code","source":"del model_a\ndel y_train_a","metadata":{"execution":{"iopub.status.busy":"2022-10-11T23:27:44.746404Z","iopub.execute_input":"2022-10-11T23:27:44.746705Z","iopub.status.idle":"2022-10-11T23:27:44.756438Z","shell.execute_reply.started":"2022-10-11T23:27:44.746678Z","shell.execute_reply":"2022-10-11T23:27:44.755238Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Doing the same for team B","metadata":{"execution":{"iopub.status.busy":"2022-10-11T22:21:20.873859Z","iopub.execute_input":"2022-10-11T22:21:20.874372Z","iopub.status.idle":"2022-10-11T22:21:20.880127Z","shell.execute_reply.started":"2022-10-11T22:21:20.874300Z","shell.execute_reply":"2022-10-11T22:21:20.878618Z"}}},{"cell_type":"code","source":"model_b = tf.keras.models.Sequential([\n    tf.keras.layers.Dense(32,activation='relu',input_shape = (67,)),\n    tf.keras.layers.Dense(64,activation='relu'),\n    tf.keras.layers.Dense(128,activation='relu'),\n    tf.keras.layers.Dense(1,activation='sigmoid')\n    ])\n    \nmodel_b.compile(loss=tf.keras.losses.BinaryCrossentropy(),\n              optimizer=tf.keras.optimizers.Adam(),\n              metrics = ['acc'])\n\nhistory_b = model_b.fit(x_train,\n                    y_train_b,\n                    epochs=3)","metadata":{"execution":{"iopub.status.busy":"2022-10-11T23:27:44.758630Z","iopub.execute_input":"2022-10-11T23:27:44.759417Z","iopub.status.idle":"2022-10-11T23:46:24.619353Z","shell.execute_reply.started":"2022-10-11T23:27:44.759380Z","shell.execute_reply":"2022-10-11T23:46:24.617864Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"history_b.model.summary()","metadata":{"execution":{"iopub.status.busy":"2022-10-11T23:04:48.804378Z","iopub.status.idle":"2022-10-11T23:04:48.804987Z","shell.execute_reply.started":"2022-10-11T23:04:48.804694Z","shell.execute_reply":"2022-10-11T23:04:48.804722Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"submission_b = history_b.model.predict(df_test)","metadata":{"execution":{"iopub.status.busy":"2022-10-12T00:18:50.292919Z","iopub.execute_input":"2022-10-12T00:18:50.293309Z","iopub.status.idle":"2022-10-12T00:19:20.491666Z","shell.execute_reply.started":"2022-10-12T00:18:50.293281Z","shell.execute_reply":"2022-10-12T00:19:20.489976Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"submission_b","metadata":{"execution":{"iopub.status.busy":"2022-10-11T23:04:48.809459Z","iopub.status.idle":"2022-10-11T23:04:48.809808Z","shell.execute_reply.started":"2022-10-11T23:04:48.809653Z","shell.execute_reply":"2022-10-11T23:04:48.809668Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"submission_b.shape","metadata":{"execution":{"iopub.status.busy":"2022-10-12T00:19:20.494182Z","iopub.execute_input":"2022-10-12T00:19:20.494626Z","iopub.status.idle":"2022-10-12T00:19:20.505803Z","shell.execute_reply.started":"2022-10-12T00:19:20.494587Z","shell.execute_reply":"2022-10-12T00:19:20.504177Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## I've gotten a lot of memory issues, so these variables will be deleted","metadata":{"execution":{"iopub.status.busy":"2022-10-11T22:28:20.705111Z","iopub.execute_input":"2022-10-11T22:28:20.705470Z","iopub.status.idle":"2022-10-11T22:28:20.736607Z","shell.execute_reply.started":"2022-10-11T22:28:20.705399Z","shell.execute_reply":"2022-10-11T22:28:20.735621Z"}}},{"cell_type":"code","source":"del y_train_b\ndel history_b","metadata":{"execution":{"iopub.status.busy":"2022-10-11T23:04:48.812415Z","iopub.status.idle":"2022-10-11T23:04:48.812718Z","shell.execute_reply.started":"2022-10-11T23:04:48.812572Z","shell.execute_reply":"2022-10-11T23:04:48.812585Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Concatenating answers into the sample submission file","metadata":{}},{"cell_type":"code","source":"submission_df = pd.read_csv(f'/kaggle/input/tabular-playground-series-oct-2022/sample_submission.csv')\nsubmission_df['team_A_scoring_within_10sec'] = submission_a\nsubmission_df['team_B_scoring_within_10sec'] = submission_b","metadata":{"execution":{"iopub.status.busy":"2022-10-12T00:20:31.776434Z","iopub.execute_input":"2022-10-12T00:20:31.776835Z","iopub.status.idle":"2022-10-12T00:20:32.019022Z","shell.execute_reply.started":"2022-10-12T00:20:31.776799Z","shell.execute_reply":"2022-10-12T00:20:32.017972Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"submission_df","metadata":{"execution":{"iopub.status.busy":"2022-10-12T00:20:37.323958Z","iopub.execute_input":"2022-10-12T00:20:37.324338Z","iopub.status.idle":"2022-10-12T00:20:37.337512Z","shell.execute_reply.started":"2022-10-12T00:20:37.324308Z","shell.execute_reply":"2022-10-12T00:20:37.336277Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"submission_df.to_csv('submission_dnn.csv', index=False)\nsubmission_df","metadata":{"execution":{"iopub.status.busy":"2022-10-12T00:20:57.119941Z","iopub.execute_input":"2022-10-12T00:20:57.120344Z","iopub.status.idle":"2022-10-12T00:20:58.592626Z","shell.execute_reply.started":"2022-10-12T00:20:57.120311Z","shell.execute_reply":"2022-10-12T00:20:58.591937Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}