{"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":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\nfrom zipfile import ZipFile\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2023-07-28T08:06:54.775409Z","iopub.execute_input":"2023-07-28T08:06:54.776115Z","iopub.status.idle":"2023-07-28T08:06:54.814785Z","shell.execute_reply.started":"2023-07-28T08:06:54.776079Z","shell.execute_reply":"2023-07-28T08:06:54.813645Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from sklearn.model_selection import train_test_split","metadata":{"execution":{"iopub.status.busy":"2023-07-28T08:06:54.816982Z","iopub.execute_input":"2023-07-28T08:06:54.817357Z","iopub.status.idle":"2023-07-28T08:06:56.156551Z","shell.execute_reply.started":"2023-07-28T08:06:54.817327Z","shell.execute_reply":"2023-07-28T08:06:56.155324Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import cv2\nimport random\nimport pickle\nfrom tqdm import tqdm\nimport matplotlib.pyplot as plt","metadata":{"execution":{"iopub.status.busy":"2023-07-28T08:06:56.159324Z","iopub.execute_input":"2023-07-28T08:06:56.159799Z","iopub.status.idle":"2023-07-28T08:06:56.389757Z","shell.execute_reply.started":"2023-07-28T08:06:56.159756Z","shell.execute_reply":"2023-07-28T08:06:56.388477Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import tensorflow as tf\nfrom tensorflow.keras.datasets import cifar10\nfrom tensorflow.keras.preprocessing.image import ImageDataGenerator\nfrom tensorflow.keras.models import Sequential\nfrom tensorflow.keras.layers import Dense, Dropout, Activation, Flatten\nfrom tensorflow.keras.layers import Conv2D, MaxPooling2D","metadata":{"execution":{"iopub.status.busy":"2023-07-28T08:06:56.392871Z","iopub.execute_input":"2023-07-28T08:06:56.393419Z","iopub.status.idle":"2023-07-28T08:07:06.231989Z","shell.execute_reply.started":"2023-07-28T08:06:56.393375Z","shell.execute_reply":"2023-07-28T08:07:06.230555Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\nwith ZipFile('/kaggle/input/dogs-vs-cats-redux-kernels-edition/train.zip', 'r') as zip:\n    #zip.printdir()\n    zip.extractall()\n    print('done')\n","metadata":{"execution":{"iopub.status.busy":"2023-07-28T08:07:06.236073Z","iopub.execute_input":"2023-07-28T08:07:06.237116Z","iopub.status.idle":"2023-07-28T08:07:18.589851Z","shell.execute_reply.started":"2023-07-28T08:07:06.237064Z","shell.execute_reply":"2023-07-28T08:07:18.588697Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"with ZipFile('/kaggle/input/dogs-vs-cats-redux-kernels-edition/test.zip', 'r') as zip:\n    #zip.printdir()\n    zip.extractall()\n    print('done')\n","metadata":{"execution":{"iopub.status.busy":"2023-07-28T08:07:18.591207Z","iopub.execute_input":"2023-07-28T08:07:18.591553Z","iopub.status.idle":"2023-07-28T08:07:24.277687Z","shell.execute_reply.started":"2023-07-28T08:07:18.591525Z","shell.execute_reply":"2023-07-28T08:07:24.276417Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"PATH = '/kaggle/working/train'\nfilename = os.listdir(PATH)\nIMG_SIZE = 100\n\nplt.figure(figsize=(10,10))\nfor i in range(1, 7):\n    img_array = cv2.imread(os.path.join(PATH, filename[i]))\n    resize_image = cv2.resize(img_array, (IMG_SIZE, IMG_SIZE))\n    plt.subplot(3,3, i)\n    image = cv2.cvtColor(resize_image, cv2.COLOR_BGR2RGB)\n    #plt.figure()\n    plt.axis('off')\n    plt.imshow(image)    ","metadata":{"execution":{"iopub.status.busy":"2023-07-28T08:07:24.279212Z","iopub.execute_input":"2023-07-28T08:07:24.280282Z","iopub.status.idle":"2023-07-28T08:07:24.977730Z","shell.execute_reply.started":"2023-07-28T08:07:24.280219Z","shell.execute_reply":"2023-07-28T08:07:24.976482Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\ntraining_data = []\nIMG_SIZE = 100\npath = '/kaggle/working/train'\nfilenames = os.listdir('/kaggle/working/train')\nfor img in tqdm(filenames):\n    try:\n        if img.find('cat') == -1:\n            category = 0\n        else:\n            category = 1\n        \n        img_array = cv2.imread(os.path.join(path, img), cv2.IMREAD_GRAYSCALE)\n        new_array = cv2.resize(img_array, (IMG_SIZE, IMG_SIZE))\n        training_data.append([new_array, category])\n    except Exception as e:\n        pass\n","metadata":{"execution":{"iopub.status.busy":"2023-07-28T08:07:24.978996Z","iopub.execute_input":"2023-07-28T08:07:24.979340Z","iopub.status.idle":"2023-07-28T08:07:51.670601Z","shell.execute_reply.started":"2023-07-28T08:07:24.979312Z","shell.execute_reply":"2023-07-28T08:07:51.669467Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.figure(figsize=(10,10))\nfor i in range(1, 7):\n    plt.subplot(3,3,i)\n    plt.axis('off')\n    if training_data[10+i][1] == 0:\n        plt.title('Dog')\n    else:\n        plt.title('Cat')\n    plt.imshow(training_data[10+i][0], cmap='gray_r')","metadata":{"execution":{"iopub.status.busy":"2023-07-28T08:07:51.672288Z","iopub.execute_input":"2023-07-28T08:07:51.672619Z","iopub.status.idle":"2023-07-28T08:07:52.508800Z","shell.execute_reply.started":"2023-07-28T08:07:51.672591Z","shell.execute_reply":"2023-07-28T08:07:52.507522Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"testing_data = []\nIMG_SIZE = 100\n\npath = '/kaggle/working/test'\nfilenames = os.listdir('/kaggle/working/test')\nfor img in tqdm(filenames):\n    try:        \n        img_array = cv2.imread(os.path.join(path, img), cv2.IMREAD_GRAYSCALE)\n        new_array = cv2.resize(img_array, (IMG_SIZE, IMG_SIZE))\n        testing_data.append([new_array])\n    except Exception as e:\n        pass","metadata":{"execution":{"iopub.status.busy":"2023-07-28T08:07:52.510681Z","iopub.execute_input":"2023-07-28T08:07:52.511290Z","iopub.status.idle":"2023-07-28T08:08:05.765490Z","shell.execute_reply.started":"2023-07-28T08:07:52.511224Z","shell.execute_reply":"2023-07-28T08:08:05.764443Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"len(training_data)","metadata":{"execution":{"iopub.status.busy":"2023-07-28T08:08:05.766993Z","iopub.execute_input":"2023-07-28T08:08:05.767332Z","iopub.status.idle":"2023-07-28T08:08:05.773982Z","shell.execute_reply.started":"2023-07-28T08:08:05.767304Z","shell.execute_reply":"2023-07-28T08:08:05.772900Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"random.shuffle(training_data)","metadata":{"execution":{"iopub.status.busy":"2023-07-28T08:08:05.775550Z","iopub.execute_input":"2023-07-28T08:08:05.775984Z","iopub.status.idle":"2023-07-28T08:08:05.813185Z","shell.execute_reply.started":"2023-07-28T08:08:05.775944Z","shell.execute_reply":"2023-07-28T08:08:05.812130Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\nX = []\ny = []\n\nfor features, label  in training_data:\n    X.append(features)\n    y.append(label)\n    \nX = np.array(X).reshape(-1, IMG_SIZE, IMG_SIZE, 1)\n","metadata":{"execution":{"iopub.status.busy":"2023-07-28T08:08:05.814880Z","iopub.execute_input":"2023-07-28T08:08:05.815336Z","iopub.status.idle":"2023-07-28T08:08:05.974492Z","shell.execute_reply.started":"2023-07-28T08:08:05.815292Z","shell.execute_reply":"2023-07-28T08:08:05.973512Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\npickle_out =open(\"X.pickle\", \"wb\")\npickle.dump(X, pickle_out)\npickle_out.close()\n\npickle_out = open(\"y.pickle\", \"wb\")\npickle.dump(y, pickle_out)\npickle_out.close()\n","metadata":{"execution":{"iopub.status.busy":"2023-07-28T08:08:05.982185Z","iopub.execute_input":"2023-07-28T08:08:05.982578Z","iopub.status.idle":"2023-07-28T08:08:06.502103Z","shell.execute_reply.started":"2023-07-28T08:08:05.982547Z","shell.execute_reply":"2023-07-28T08:08:06.501125Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"pickle_in = open(\"X.pickle\", \"rb\")\nX = pickle.load(pickle_in)\n\npickle_in = open(\"y.pickle\", \"rb\")\ny = pickle.load(pickle_in)","metadata":{"execution":{"iopub.status.busy":"2023-07-28T08:08:06.504082Z","iopub.execute_input":"2023-07-28T08:08:06.504579Z","iopub.status.idle":"2023-07-28T08:08:06.660273Z","shell.execute_reply.started":"2023-07-28T08:08:06.504528Z","shell.execute_reply":"2023-07-28T08:08:06.658754Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"X = X/255.0\n\nX = np.array(X)\ny = np.array(y)\n","metadata":{"execution":{"iopub.status.busy":"2023-07-28T08:08:06.661663Z","iopub.execute_input":"2023-07-28T08:08:06.662012Z","iopub.status.idle":"2023-07-28T08:08:08.425982Z","shell.execute_reply.started":"2023-07-28T08:08:06.661983Z","shell.execute_reply":"2023-07-28T08:08:08.424795Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"len(X)","metadata":{"execution":{"iopub.status.busy":"2023-07-28T08:08:08.427423Z","iopub.execute_input":"2023-07-28T08:08:08.427850Z","iopub.status.idle":"2023-07-28T08:08:08.434863Z","shell.execute_reply.started":"2023-07-28T08:08:08.427821Z","shell.execute_reply":"2023-07-28T08:08:08.433663Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"len(y)","metadata":{"execution":{"iopub.status.busy":"2023-07-28T08:08:08.436807Z","iopub.execute_input":"2023-07-28T08:08:08.437232Z","iopub.status.idle":"2023-07-28T08:08:08.449484Z","shell.execute_reply.started":"2023-07-28T08:08:08.437193Z","shell.execute_reply":"2023-07-28T08:08:08.448332Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"X_train, x_test, y_train, y_test = train_test_split(X, y, test_size = 0.2, random_state=50)","metadata":{"execution":{"iopub.status.busy":"2023-07-28T08:08:08.450716Z","iopub.execute_input":"2023-07-28T08:08:08.451027Z","iopub.status.idle":"2023-07-28T08:08:09.043012Z","shell.execute_reply.started":"2023-07-28T08:08:08.450994Z","shell.execute_reply":"2023-07-28T08:08:09.041968Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"len(X_train)","metadata":{"execution":{"iopub.status.busy":"2023-07-28T08:08:09.044557Z","iopub.execute_input":"2023-07-28T08:08:09.044930Z","iopub.status.idle":"2023-07-28T08:08:09.053625Z","shell.execute_reply.started":"2023-07-28T08:08:09.044901Z","shell.execute_reply":"2023-07-28T08:08:09.052585Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"len(y_train)","metadata":{"execution":{"iopub.status.busy":"2023-07-28T08:08:09.055032Z","iopub.execute_input":"2023-07-28T08:08:09.055563Z","iopub.status.idle":"2023-07-28T08:08:09.070708Z","shell.execute_reply.started":"2023-07-28T08:08:09.055519Z","shell.execute_reply":"2023-07-28T08:08:09.069518Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"model = Sequential()\n\nmodel.add(Conv2D(256, (3,3), input_shape=X_train.shape[1:]))\nmodel.add(Activation('relu'))\nmodel.add(MaxPooling2D(pool_size=(2,2)))\n\nmodel.add(Conv2D(256, (3,3)))\nmodel.add(Activation('relu'))\nmodel.add(MaxPooling2D(pool_size=(2,2)))\n\nmodel.add(Flatten()) # this converts our 3D feature maps to 1D feature vectors\n\nmodel.add(Dense(64))\nmodel.add(Dense(1))\n\nmodel.add(Activation('sigmoid'))\n","metadata":{"execution":{"iopub.status.busy":"2023-07-28T08:08:09.071892Z","iopub.execute_input":"2023-07-28T08:08:09.072352Z","iopub.status.idle":"2023-07-28T08:08:09.404443Z","shell.execute_reply.started":"2023-07-28T08:08:09.072310Z","shell.execute_reply":"2023-07-28T08:08:09.403485Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'],)\n\nhistory = model.fit(X_train, y_train, batch_size=32, epochs=15, validation_data = (x_test, y_test))","metadata":{"execution":{"iopub.status.busy":"2023-07-28T08:08:09.405779Z","iopub.execute_input":"2023-07-28T08:08:09.406109Z","iopub.status.idle":"2023-07-28T16:57:34.028901Z","shell.execute_reply.started":"2023-07-28T08:08:09.406081Z","shell.execute_reply":"2023-07-28T16:57:34.025164Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"score = model.evaluate(x_test, y_test, verbose=0)\nprint('Test Loss:', score[0])\nprint('Test accuracy:', score[1])","metadata":{"execution":{"iopub.status.busy":"2023-07-28T16:57:34.036080Z","iopub.execute_input":"2023-07-28T16:57:34.038409Z","iopub.status.idle":"2023-07-28T17:00:57.917192Z","shell.execute_reply.started":"2023-07-28T16:57:34.038312Z","shell.execute_reply":"2023-07-28T17:00:57.915796Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Plotting our loss charts\n# Use the history object we created to get our saved perormace result.\nhistory_dict = history.history\n\n# Extract the loss and validation losses\nloss_values = history_dict['loss']\nval_loss_values = history_dict['val_loss']\n\nepochs = range(1, len(loss_values)+1)\n\nline1 = plt.plot(epochs, val_loss_values, label ='Validation/Test Loss')\nline2 = plt.plot(epochs, loss_values, label='Training Loss')\nplt.setp(line1, linewidth = 2.0, marker='+', markersize=10.0)\nplt.setp(line2, linewidth=2.0, marker='4', markersize=10.0)\nplt.legend()\nplt.grid(True)\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2023-07-28T17:00:57.918847Z","iopub.execute_input":"2023-07-28T17:00:57.920002Z","iopub.status.idle":"2023-07-28T17:00:58.326427Z","shell.execute_reply.started":"2023-07-28T17:00:57.919965Z","shell.execute_reply":"2023-07-28T17:00:58.325217Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"history_dict = history.history\n\nacc_values = history_dict['accuracy']\nval_acc_values = history_dict['val_accuracy']\nepochs = range(1, len(loss_values)+1)\n\nline1 = plt.plot(epochs, val_loss_values, label='Validation/Test Accuracy')\nline2 = plt.plot(epochs, acc_values, label ='Training Accuracy')\n\nplt.setp(line1, linewidth=2.0, marker='+', markersize=10.0)\nplt.setp(line2, linewidth=2.0, marker='4', markersize=10.0)\nplt.xlabel('Epochs')\nplt.ylabel('Accuracy')\nplt.grid(True)\nplt.legend()\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2023-07-28T17:00:58.328111Z","iopub.execute_input":"2023-07-28T17:00:58.328548Z","iopub.status.idle":"2023-07-28T17:00:58.600374Z","shell.execute_reply.started":"2023-07-28T17:00:58.328514Z","shell.execute_reply":"2023-07-28T17:00:58.599066Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"IMG_SIZE = 100\ntest = []\n\nfor features  in testing_data:\n    test.append(features)\n    \ntest = np.array(test).reshape(-1, IMG_SIZE, IMG_SIZE, 1)","metadata":{"execution":{"iopub.status.busy":"2023-07-28T17:00:58.601958Z","iopub.execute_input":"2023-07-28T17:00:58.602868Z","iopub.status.idle":"2023-07-28T17:00:58.735913Z","shell.execute_reply.started":"2023-07-28T17:00:58.602819Z","shell.execute_reply":"2023-07-28T17:00:58.734553Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test = test/255.0\n\ntest = np.array(test)","metadata":{"execution":{"iopub.status.busy":"2023-07-28T17:00:58.737968Z","iopub.execute_input":"2023-07-28T17:00:58.738539Z","iopub.status.idle":"2023-07-28T17:01:03.063861Z","shell.execute_reply.started":"2023-07-28T17:00:58.738487Z","shell.execute_reply":"2023-07-28T17:01:03.062134Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"prediction = model.predict(test) ","metadata":{"execution":{"iopub.status.busy":"2023-07-28T17:01:03.068446Z","iopub.execute_input":"2023-07-28T17:01:03.072662Z","iopub.status.idle":"2023-07-28T17:07:30.424769Z","shell.execute_reply.started":"2023-07-28T17:01:03.072523Z","shell.execute_reply":"2023-07-28T17:07:30.423692Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#predict_xtest = model.predict(x_test) ","metadata":{"execution":{"iopub.status.busy":"2023-07-28T17:07:30.426562Z","iopub.execute_input":"2023-07-28T17:07:30.427688Z","iopub.status.idle":"2023-07-28T17:07:30.433007Z","shell.execute_reply.started":"2023-07-28T17:07:30.427628Z","shell.execute_reply":"2023-07-28T17:07:30.431571Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#predict_xtest ","metadata":{"execution":{"iopub.status.busy":"2023-07-28T17:07:30.434683Z","iopub.execute_input":"2023-07-28T17:07:30.435647Z","iopub.status.idle":"2023-07-28T17:07:30.447722Z","shell.execute_reply.started":"2023-07-28T17:07:30.435606Z","shell.execute_reply":"2023-07-28T17:07:30.446553Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"prediction","metadata":{"execution":{"iopub.status.busy":"2023-07-28T17:07:30.449847Z","iopub.execute_input":"2023-07-28T17:07:30.450271Z","iopub.status.idle":"2023-07-28T17:07:30.465747Z","shell.execute_reply.started":"2023-07-28T17:07:30.450221Z","shell.execute_reply":"2023-07-28T17:07:30.464348Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"prediction.shape","metadata":{"execution":{"iopub.status.busy":"2023-07-28T17:07:30.467302Z","iopub.execute_input":"2023-07-28T17:07:30.467631Z","iopub.status.idle":"2023-07-28T17:07:30.476761Z","shell.execute_reply.started":"2023-07-28T17:07:30.467604Z","shell.execute_reply":"2023-07-28T17:07:30.475621Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"my_submission = pd.read_csv('/kaggle/input/dogs-vs-cats-redux-kernels-edition/sample_submission.csv')","metadata":{"execution":{"iopub.status.busy":"2023-07-28T17:07:30.478766Z","iopub.execute_input":"2023-07-28T17:07:30.479104Z","iopub.status.idle":"2023-07-28T17:07:30.527510Z","shell.execute_reply.started":"2023-07-28T17:07:30.479075Z","shell.execute_reply":"2023-07-28T17:07:30.526215Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"my_submission.head()","metadata":{"execution":{"iopub.status.busy":"2023-07-28T17:07:30.529136Z","iopub.execute_input":"2023-07-28T17:07:30.529610Z","iopub.status.idle":"2023-07-28T17:07:30.561950Z","shell.execute_reply.started":"2023-07-28T17:07:30.529567Z","shell.execute_reply":"2023-07-28T17:07:30.560967Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"my_submission['label'] = prediction","metadata":{"execution":{"iopub.status.busy":"2023-07-28T17:07:30.563429Z","iopub.execute_input":"2023-07-28T17:07:30.563842Z","iopub.status.idle":"2023-07-28T17:07:30.569439Z","shell.execute_reply.started":"2023-07-28T17:07:30.563814Z","shell.execute_reply":"2023-07-28T17:07:30.568299Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"my_submission['label'] = my_submission['label'].map(lambda x: 1 if x >= 0.5 else 0 )","metadata":{"execution":{"iopub.status.busy":"2023-07-28T17:07:30.571138Z","iopub.execute_input":"2023-07-28T17:07:30.571597Z","iopub.status.idle":"2023-07-28T17:07:30.595065Z","shell.execute_reply.started":"2023-07-28T17:07:30.571556Z","shell.execute_reply":"2023-07-28T17:07:30.593847Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"my_submission.head()","metadata":{"execution":{"iopub.status.busy":"2023-07-28T17:07:30.597157Z","iopub.execute_input":"2023-07-28T17:07:30.597564Z","iopub.status.idle":"2023-07-28T17:07:30.615383Z","shell.execute_reply.started":"2023-07-28T17:07:30.597532Z","shell.execute_reply":"2023-07-28T17:07:30.614334Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"my_submission['label'] = my_submission['label'].round(1)","metadata":{"execution":{"iopub.status.busy":"2023-07-28T17:07:30.616524Z","iopub.execute_input":"2023-07-28T17:07:30.616927Z","iopub.status.idle":"2023-07-28T17:07:30.623404Z","shell.execute_reply.started":"2023-07-28T17:07:30.616893Z","shell.execute_reply":"2023-07-28T17:07:30.622398Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"my_submission.to_csv('my_submission.csv', index=False)","metadata":{"execution":{"iopub.status.busy":"2023-07-28T17:07:30.624670Z","iopub.execute_input":"2023-07-28T17:07:30.624985Z","iopub.status.idle":"2023-07-28T17:07:30.670033Z","shell.execute_reply.started":"2023-07-28T17:07:30.624958Z","shell.execute_reply":"2023-07-28T17:07:30.668857Z"},"trusted":true},"execution_count":null,"outputs":[]}]}