Buckets:
| {"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.6.6","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"none","dataSources":[{"sourceId":3136,"databundleVersionId":26502,"sourceType":"competition"}],"dockerImageVersionId":29507,"isInternetEnabled":false,"language":"python","sourceType":"notebook","isGpuEnabled":false},"colab":{"provenance":[]}},"nbformat_minor":0,"nbformat":4,"cells":[{"cell_type":"markdown","source":["Logging into Kaggle for the first time can be daunting. Our competitions often have large cash prizes, public leaderboards, and involve complex data. Nevertheless, we really think all data scientists can rapidly learn from machine learning competitions and meaningfully contribute to our community. To give you a clear understanding of how our platform works and a mental model of the type of learning you could do on Kaggle, we've created a Getting Started tutorial for the Titanic competition. It walks you through the initial steps required to get your first decent submission on the leaderboard. By the end of the tutorial, you'll also have a solid understanding of how to use Kaggle's online coding environment, where you'll have trained your own machine learning model.\n","\n","So if this is your first time entering a Kaggle competition, regardless of whether you:\n","- have experience with handling large datasets,\n","- haven't done much coding,\n","- are newer to data science, or\n","- are relatively experienced (but are just unfamiliar with Kaggle's platform),\n","\n","you're in the right place!\n","\n","# Part 1: Get started\n","\n","In this section, you'll learn more about the competition and make your first submission.\n","\n","## Join the competition!\n","\n","The first thing to do is to join the competition! Open a new window with **[the competition page](https://www.kaggle.com/c/titanic)**, and click on the **\"Join Competition\"** button, if you haven't already. (_If you see a \"Submit Predictions\" button instead of a \"Join Competition\" button, you have already joined the competition, and don't need to do so again._)\n","\n","\n","\n","This takes you to the rules acceptance page. You must accept the competition rules in order to participate. These rules govern how many submissions you can make per day, the maximum team size, and other competition-specific details. Then, click on **\"I Understand and Accept\"** to indicate that you will abide by the competition rules.\n","\n","## The challenge\n","\n","The competition is simple: we want you to use the Titanic passenger data (name, age, price of ticket, etc) to try to predict who will survive and who will die.\n","\n","## The data\n","\n","To take a look at the competition data, click on the **<a href=\"https://www.kaggle.com/c/titanic/data\" target=\"_blank\" rel=\"noopener noreferrer\"><b>Data tab</b></a>** at the top of the competition page. Then, scroll down to find the list of files. \n","There are three files in the data: (1) **train.csv**, (2) **test.csv**, and (3) **gender_submission.csv**.\n","\n","### (1) train.csv\n","\n","**train.csv** contains the details of a subset of the passengers on board (891 passengers, to be exact -- where each passenger gets a different row in the table). To investigate this data, click on the name of the file on the left of the screen. Once you've done this, you can view all of the data in the window. \n","\n","\n","\n","The values in the second column (**\"Survived\"**) can be used to determine whether each passenger survived or not:\n","- if it's a \"1\", the passenger survived.\n","- if it's a \"0\", the passenger died.\n","\n","For instance, the first passenger listed in **train.csv** is Mr. Owen Harris Braund. He was 22 years old when he died on the Titanic.\n","\n","### (2) test.csv\n","\n","Using the patterns you find in **train.csv**, you have to predict whether the other 418 passengers on board (in **test.csv**) survived. \n","\n","Click on **test.csv** (on the left of the screen) to examine its contents. Note that **test.csv** does not have a **\"Survived\"** column - this information is hidden from you, and how well you do at predicting these hidden values will determine how highly you score in the competition!\n","\n","### (3) gender_submission.csv\n","\n","The **gender_submission.csv** file is provided as an example that shows how you should structure your predictions. It predicts that all female passengers survived, and all male passengers died. Your hypotheses regarding survival will probably be different, which will lead to a different submission file. But, just like this file, your submission should have:\n","- a **\"PassengerId\"** column containing the IDs of each passenger from **test.csv**.\n","- a **\"Survived\"** column (that you will create!) with a \"1\" for the rows where you think the passenger survived, and a \"0\" where you predict that the passenger died."],"metadata":{"id":"0k2oO64Czhtw"}},{"cell_type":"markdown","source":["# Part 2: Your coding environment\n","\n","In this section, you'll train your own machine learning model to improve your predictions. _If you've never written code before or don't have any experience with machine learning, don't worry! We don't assume any prior experience in this tutorial._\n","\n","## The Notebook\n","\n","The first thing to do is to create a Kaggle Notebook where you'll store all of your code. You can use Kaggle Notebooks to getting up and running with writing code quickly, and without having to install anything on your computer. (_If you are interested in deep learning, we also offer free GPU access!_)\n","\n","Begin by clicking on the **<a href=\"https://www.kaggle.com/c/titanic/kernels\" target=\"_blank\">Code tab</a>** on the competition page. Then, click on **\"New Notebook\"**.\n","\n","\n","\n","Your notebook will take a few seconds to load. In the top left corner, you can see the name of your notebook -- something like **\"kernel2daed3cd79\"**.\n","\n","\n","\n","You can edit the name by clicking on it. Change it to something more descriptive, like **\"Getting Started with Titanic\"**. \n","\n","\n","\n","## Your first lines of code\n","\n","When you start a new notebook, it has two gray boxes for storing code. We refer to these gray boxes as \"code cells\".\n","\n","\n","\n","The first code cell already has some code in it. To run this code, put your cursor in the code cell. (_If your cursor is in the right place, you'll notice a blue vertical line to the left of the gray box._) Then, either hit the play button (which appears to the left of the blue line), or hit **[Shift] + [Enter]** on your keyboard.\n","\n","If the code runs successfully, three lines of output are returned. Below, you can see the same code that you just ran, along with the output that you should see in your notebook."],"metadata":{"id":"rX3Ji6xXzhtz"}},{"cell_type":"markdown","source":["This shows us where the competition data is stored, so that we can load the files into the notebook. We'll do that next.\n","\n","## Load the data\n","\n","The second code cell in your notebook now appears below the three lines of output with the file locations.\n","\n","\n","\n","Type the two lines of code below into your second code cell. Then, once you're done, either click on the blue play button, or hit **[Shift] + [Enter]**. "],"metadata":{"id":"-accxxeqzht2"}},{"cell_type":"code","source":["train_data = pd.read_csv(\"/content/train.csv\")\n","train_data.head()"],"metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-01-02T06:51:03.234293Z","iopub.execute_input":"2025-01-02T06:51:03.234585Z","iopub.status.idle":"2025-01-02T06:51:03.275346Z","shell.execute_reply.started":"2025-01-02T06:51:03.234540Z","shell.execute_reply":"2025-01-02T06:51:03.274562Z"},"colab":{"base_uri":"https://localhost:8080/","height":206},"id":"KOpy4NBGzht2","executionInfo":{"status":"ok","timestamp":1735801329045,"user_tz":-60,"elapsed":316,"user":{"displayName":"Tongue Kevin","userId":"13768078595560270101"}},"outputId":"cdf04d00-ecb0-4b44-d7c4-64174286c4ff"},"outputs":[{"output_type":"execute_result","data":{"text/plain":[" PassengerId Survived Pclass \\\n","0 1 0 3 \n","1 2 1 1 \n","2 3 1 3 \n","3 4 1 1 \n","4 5 0 3 \n","\n"," Name Sex Age SibSp \\\n","0 Braund, Mr. Owen Harris male 22.0 1 \n","1 Cumings, Mrs. John Bradley (Florence Briggs Th... female 38.0 1 \n","2 Heikkinen, Miss. Laina female 26.0 0 \n","3 Futrelle, Mrs. Jacques Heath (Lily May Peel) female 35.0 1 \n","4 Allen, Mr. William Henry male 35.0 0 \n","\n"," Parch Ticket Fare Cabin Embarked \n","0 0 A/5 21171 7.2500 NaN S \n","1 0 PC 17599 71.2833 C85 C \n","2 0 STON/O2. 3101282 7.9250 NaN S \n","3 0 113803 53.1000 C123 S \n","4 0 373450 8.0500 NaN S "],"text/html":["\n"," <div id=\"df-3155e7de-6545-40e1-accf-7493d5fdca99\" class=\"colab-df-container\">\n"," <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>PassengerId</th>\n"," <th>Survived</th>\n"," <th>Pclass</th>\n"," <th>Name</th>\n"," <th>Sex</th>\n"," <th>Age</th>\n"," <th>SibSp</th>\n"," <th>Parch</th>\n"," <th>Ticket</th>\n"," <th>Fare</th>\n"," <th>Cabin</th>\n"," <th>Embarked</th>\n"," </tr>\n"," </thead>\n"," <tbody>\n"," <tr>\n"," <th>0</th>\n"," <td>1</td>\n"," <td>0</td>\n"," <td>3</td>\n"," <td>Braund, Mr. Owen Harris</td>\n"," <td>male</td>\n"," <td>22.0</td>\n"," <td>1</td>\n"," <td>0</td>\n"," <td>A/5 21171</td>\n"," <td>7.2500</td>\n"," <td>NaN</td>\n"," <td>S</td>\n"," </tr>\n"," <tr>\n"," <th>1</th>\n"," <td>2</td>\n"," <td>1</td>\n"," <td>1</td>\n"," <td>Cumings, Mrs. John Bradley (Florence Briggs Th...</td>\n"," <td>female</td>\n"," <td>38.0</td>\n"," <td>1</td>\n"," <td>0</td>\n"," <td>PC 17599</td>\n"," <td>71.2833</td>\n"," <td>C85</td>\n"," <td>C</td>\n"," </tr>\n"," <tr>\n"," <th>2</th>\n"," <td>3</td>\n"," <td>1</td>\n"," <td>3</td>\n"," <td>Heikkinen, Miss. Laina</td>\n"," <td>female</td>\n"," <td>26.0</td>\n"," <td>0</td>\n"," <td>0</td>\n"," <td>STON/O2. 3101282</td>\n"," <td>7.9250</td>\n"," <td>NaN</td>\n"," <td>S</td>\n"," </tr>\n"," <tr>\n"," <th>3</th>\n"," <td>4</td>\n"," <td>1</td>\n"," <td>1</td>\n"," <td>Futrelle, Mrs. Jacques Heath (Lily May Peel)</td>\n"," <td>female</td>\n"," <td>35.0</td>\n"," <td>1</td>\n"," <td>0</td>\n"," <td>113803</td>\n"," <td>53.1000</td>\n"," <td>C123</td>\n"," <td>S</td>\n"," </tr>\n"," <tr>\n"," <th>4</th>\n"," <td>5</td>\n"," <td>0</td>\n"," <td>3</td>\n"," <td>Allen, Mr. William Henry</td>\n"," <td>male</td>\n"," <td>35.0</td>\n"," <td>0</td>\n"," <td>0</td>\n"," <td>373450</td>\n"," <td>8.0500</td>\n"," <td>NaN</td>\n"," <td>S</td>\n"," </tr>\n"," </tbody>\n","</table>\n","</div>\n"," <div class=\"colab-df-buttons\">\n","\n"," <div class=\"colab-df-container\">\n"," <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-3155e7de-6545-40e1-accf-7493d5fdca99')\"\n"," title=\"Convert this dataframe to an interactive table.\"\n"," style=\"display:none;\">\n","\n"," <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n"," <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n"," </svg>\n"," </button>\n","\n"," <style>\n"," .colab-df-container {\n"," display:flex;\n"," gap: 12px;\n"," }\n","\n"," .colab-df-convert {\n"," background-color: #E8F0FE;\n"," border: none;\n"," border-radius: 50%;\n"," cursor: pointer;\n"," display: none;\n"," fill: #1967D2;\n"," height: 32px;\n"," padding: 0 0 0 0;\n"," width: 32px;\n"," }\n","\n"," .colab-df-convert:hover {\n"," background-color: #E2EBFA;\n"," box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n"," fill: #174EA6;\n"," }\n","\n"," .colab-df-buttons div {\n"," margin-bottom: 4px;\n"," }\n","\n"," [theme=dark] .colab-df-convert {\n"," background-color: #3B4455;\n"," fill: #D2E3FC;\n"," }\n","\n"," [theme=dark] .colab-df-convert:hover {\n"," background-color: #434B5C;\n"," box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n"," filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n"," fill: #FFFFFF;\n"," }\n"," </style>\n","\n"," <script>\n"," const buttonEl =\n"," document.querySelector('#df-3155e7de-6545-40e1-accf-7493d5fdca99 button.colab-df-convert');\n"," buttonEl.style.display =\n"," google.colab.kernel.accessAllowed ? 'block' : 'none';\n","\n"," async function convertToInteractive(key) {\n"," const element = document.querySelector('#df-3155e7de-6545-40e1-accf-7493d5fdca99');\n"," const dataTable =\n"," await google.colab.kernel.invokeFunction('convertToInteractive',\n"," [key], {});\n"," if (!dataTable) return;\n","\n"," const docLinkHtml = 'Like what you see? Visit the ' +\n"," '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n"," + ' to learn more about interactive tables.';\n"," element.innerHTML = '';\n"," dataTable['output_type'] = 'display_data';\n"," await google.colab.output.renderOutput(dataTable, element);\n"," const docLink = document.createElement('div');\n"," docLink.innerHTML = docLinkHtml;\n"," element.appendChild(docLink);\n"," }\n"," </script>\n"," </div>\n","\n","\n","<div id=\"df-36a64685-6c38-4d47-9a7d-90a3a6133c01\">\n"," <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-36a64685-6c38-4d47-9a7d-90a3a6133c01')\"\n"," title=\"Suggest charts\"\n"," style=\"display:none;\">\n","\n","<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n"," width=\"24px\">\n"," <g>\n"," <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n"," </g>\n","</svg>\n"," </button>\n","\n","<style>\n"," .colab-df-quickchart {\n"," --bg-color: #E8F0FE;\n"," --fill-color: #1967D2;\n"," --hover-bg-color: #E2EBFA;\n"," --hover-fill-color: #174EA6;\n"," --disabled-fill-color: #AAA;\n"," --disabled-bg-color: #DDD;\n"," }\n","\n"," [theme=dark] .colab-df-quickchart {\n"," --bg-color: #3B4455;\n"," --fill-color: #D2E3FC;\n"," --hover-bg-color: #434B5C;\n"," --hover-fill-color: #FFFFFF;\n"," --disabled-bg-color: #3B4455;\n"," --disabled-fill-color: #666;\n"," }\n","\n"," .colab-df-quickchart {\n"," background-color: var(--bg-color);\n"," border: none;\n"," border-radius: 50%;\n"," cursor: pointer;\n"," display: none;\n"," fill: var(--fill-color);\n"," height: 32px;\n"," padding: 0;\n"," width: 32px;\n"," }\n","\n"," .colab-df-quickchart:hover {\n"," background-color: var(--hover-bg-color);\n"," box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n"," fill: var(--button-hover-fill-color);\n"," }\n","\n"," .colab-df-quickchart-complete:disabled,\n"," .colab-df-quickchart-complete:disabled:hover {\n"," background-color: var(--disabled-bg-color);\n"," fill: var(--disabled-fill-color);\n"," box-shadow: none;\n"," }\n","\n"," .colab-df-spinner {\n"," border: 2px solid var(--fill-color);\n"," border-color: transparent;\n"," border-bottom-color: var(--fill-color);\n"," animation:\n"," spin 1s steps(1) infinite;\n"," }\n","\n"," @keyframes spin {\n"," 0% {\n"," border-color: transparent;\n"," border-bottom-color: var(--fill-color);\n"," border-left-color: var(--fill-color);\n"," }\n"," 20% {\n"," border-color: transparent;\n"," border-left-color: var(--fill-color);\n"," border-top-color: var(--fill-color);\n"," }\n"," 30% {\n"," border-color: transparent;\n"," border-left-color: var(--fill-color);\n"," border-top-color: var(--fill-color);\n"," border-right-color: var(--fill-color);\n"," }\n"," 40% {\n"," border-color: transparent;\n"," border-right-color: var(--fill-color);\n"," border-top-color: var(--fill-color);\n"," }\n"," 60% {\n"," border-color: transparent;\n"," border-right-color: var(--fill-color);\n"," }\n"," 80% {\n"," border-color: transparent;\n"," border-right-color: var(--fill-color);\n"," border-bottom-color: var(--fill-color);\n"," }\n"," 90% {\n"," border-color: transparent;\n"," border-bottom-color: var(--fill-color);\n"," }\n"," }\n","</style>\n","\n"," <script>\n"," async function quickchart(key) {\n"," const quickchartButtonEl =\n"," document.querySelector('#' + key + ' button');\n"," quickchartButtonEl.disabled = true; // To prevent multiple clicks.\n"," quickchartButtonEl.classList.add('colab-df-spinner');\n"," try {\n"," const charts = await google.colab.kernel.invokeFunction(\n"," 'suggestCharts', [key], {});\n"," } catch (error) {\n"," console.error('Error during call to suggestCharts:', error);\n"," }\n"," quickchartButtonEl.classList.remove('colab-df-spinner');\n"," quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n"," }\n"," (() => {\n"," let quickchartButtonEl =\n"," document.querySelector('#df-36a64685-6c38-4d47-9a7d-90a3a6133c01 button');\n"," quickchartButtonEl.style.display =\n"," google.colab.kernel.accessAllowed ? 'block' : 'none';\n"," })();\n"," </script>\n","</div>\n","\n"," </div>\n"," </div>\n"],"application/vnd.google.colaboratory.intrinsic+json":{"type":"dataframe","variable_name":"train_data","summary":"{\n \"name\": \"train_data\",\n \"rows\": 891,\n \"fields\": [\n {\n \"column\": \"PassengerId\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 257,\n \"min\": 1,\n \"max\": 891,\n \"num_unique_values\": 891,\n \"samples\": [\n 710,\n 440,\n 841\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Survived\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0,\n \"min\": 0,\n \"max\": 1,\n \"num_unique_values\": 2,\n \"samples\": [\n 1,\n 0\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Pclass\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0,\n \"min\": 1,\n \"max\": 3,\n \"num_unique_values\": 3,\n \"samples\": [\n 3,\n 1\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Name\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 891,\n \"samples\": [\n \"Moubarek, Master. Halim Gonios (\\\"William George\\\")\",\n \"Kvillner, Mr. Johan Henrik Johannesson\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Sex\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 2,\n \"samples\": [\n \"female\",\n \"male\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Age\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 14.526497332334044,\n \"min\": 0.42,\n \"max\": 80.0,\n \"num_unique_values\": 88,\n \"samples\": [\n 0.75,\n 22.0\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"SibSp\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 1,\n \"min\": 0,\n \"max\": 8,\n \"num_unique_values\": 7,\n \"samples\": [\n 1,\n 0\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Parch\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0,\n \"min\": 0,\n \"max\": 6,\n \"num_unique_values\": 7,\n \"samples\": [\n 0,\n 1\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Ticket\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 681,\n \"samples\": [\n \"11774\",\n \"248740\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Fare\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 49.693428597180905,\n \"min\": 0.0,\n \"max\": 512.3292,\n \"num_unique_values\": 248,\n \"samples\": [\n 11.2417,\n 51.8625\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Cabin\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 147,\n \"samples\": [\n \"D45\",\n \"B49\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Embarked\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 3,\n \"samples\": [\n \"S\",\n \"C\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}"}},"metadata":{},"execution_count":6}],"execution_count":6},{"cell_type":"markdown","source":["Your code should return the output above, which corresponds to the first five rows of the table in **train.csv**. It's very important that you see this output **in your notebook** before proceeding with the tutorial!\n","> _If your code does not produce this output_, double-check that your code is identical to the two lines above. And, make sure your cursor is in the code cell before hitting **[Shift] + [Enter]**.\n","\n","The code that you've just written is in the Python programming language. It uses a Python \"module\" called **pandas** (abbreviated as `pd`) to load the table from the **train.csv** file into the notebook. To do this, we needed to plug in the location of the file (which we saw was `/kaggle/input/titanic/train.csv`). \n","> If you're not already familiar with Python (and pandas), the code shouldn't make sense to you -- but don't worry! The point of this tutorial is to (quickly!) make your first submission to the competition. At the end of the tutorial, we suggest resources to continue your learning.\n","\n","At this point, you should have at least three code cells in your notebook. \n","\n","\n","Copy the code below into the third code cell of your notebook to load the contents of the **test.csv** file. Don't forget to click on the play button (or hit **[Shift] + [Enter]**)!"],"metadata":{"id":"PlJVHajZzht3"}},{"cell_type":"code","source":["test_data = pd.read_csv(\"/content/test.csv\")\n","test_data.head()"],"metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-01-02T06:51:34.059673Z","iopub.execute_input":"2025-01-02T06:51:34.060023Z","iopub.status.idle":"2025-01-02T06:51:34.083711Z","shell.execute_reply.started":"2025-01-02T06:51:34.059969Z","shell.execute_reply":"2025-01-02T06:51:34.082936Z"},"colab":{"base_uri":"https://localhost:8080/","height":206},"id":"zQvjkfa1zht3","executionInfo":{"status":"ok","timestamp":1735801341943,"user_tz":-60,"elapsed":250,"user":{"displayName":"Tongue Kevin","userId":"13768078595560270101"}},"outputId":"bac637d8-b889-424d-bbfe-522fd7585228"},"outputs":[{"output_type":"execute_result","data":{"text/plain":[" PassengerId Pclass Name Sex \\\n","0 892 3 Kelly, Mr. James male \n","1 893 3 Wilkes, Mrs. James (Ellen Needs) female \n","2 894 2 Myles, Mr. Thomas Francis male \n","3 895 3 Wirz, Mr. Albert male \n","4 896 3 Hirvonen, Mrs. Alexander (Helga E Lindqvist) female \n","\n"," Age SibSp Parch Ticket Fare Cabin Embarked \n","0 34.5 0 0 330911 7.8292 NaN Q \n","1 47.0 1 0 363272 7.0000 NaN S \n","2 62.0 0 0 240276 9.6875 NaN Q \n","3 27.0 0 0 315154 8.6625 NaN S \n","4 22.0 1 1 3101298 12.2875 NaN S "],"text/html":["\n"," <div id=\"df-5307d172-3d2c-44d8-912f-d0fd87dfca24\" class=\"colab-df-container\">\n"," <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>PassengerId</th>\n"," <th>Pclass</th>\n"," <th>Name</th>\n"," <th>Sex</th>\n"," <th>Age</th>\n"," <th>SibSp</th>\n"," <th>Parch</th>\n"," <th>Ticket</th>\n"," <th>Fare</th>\n"," <th>Cabin</th>\n"," <th>Embarked</th>\n"," </tr>\n"," </thead>\n"," <tbody>\n"," <tr>\n"," <th>0</th>\n"," <td>892</td>\n"," <td>3</td>\n"," <td>Kelly, Mr. James</td>\n"," <td>male</td>\n"," <td>34.5</td>\n"," <td>0</td>\n"," <td>0</td>\n"," <td>330911</td>\n"," <td>7.8292</td>\n"," <td>NaN</td>\n"," <td>Q</td>\n"," </tr>\n"," <tr>\n"," <th>1</th>\n"," <td>893</td>\n"," <td>3</td>\n"," <td>Wilkes, Mrs. James (Ellen Needs)</td>\n"," <td>female</td>\n"," <td>47.0</td>\n"," <td>1</td>\n"," <td>0</td>\n"," <td>363272</td>\n"," <td>7.0000</td>\n"," <td>NaN</td>\n"," <td>S</td>\n"," </tr>\n"," <tr>\n"," <th>2</th>\n"," <td>894</td>\n"," <td>2</td>\n"," <td>Myles, Mr. Thomas Francis</td>\n"," <td>male</td>\n"," <td>62.0</td>\n"," <td>0</td>\n"," <td>0</td>\n"," <td>240276</td>\n"," <td>9.6875</td>\n"," <td>NaN</td>\n"," <td>Q</td>\n"," </tr>\n"," <tr>\n"," <th>3</th>\n"," <td>895</td>\n"," <td>3</td>\n"," <td>Wirz, Mr. Albert</td>\n"," <td>male</td>\n"," <td>27.0</td>\n"," <td>0</td>\n"," <td>0</td>\n"," <td>315154</td>\n"," <td>8.6625</td>\n"," <td>NaN</td>\n"," <td>S</td>\n"," </tr>\n"," <tr>\n"," <th>4</th>\n"," <td>896</td>\n"," <td>3</td>\n"," <td>Hirvonen, Mrs. Alexander (Helga E Lindqvist)</td>\n"," <td>female</td>\n"," <td>22.0</td>\n"," <td>1</td>\n"," <td>1</td>\n"," <td>3101298</td>\n"," <td>12.2875</td>\n"," <td>NaN</td>\n"," <td>S</td>\n"," </tr>\n"," </tbody>\n","</table>\n","</div>\n"," <div class=\"colab-df-buttons\">\n","\n"," <div class=\"colab-df-container\">\n"," <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-5307d172-3d2c-44d8-912f-d0fd87dfca24')\"\n"," title=\"Convert this dataframe to an interactive table.\"\n"," style=\"display:none;\">\n","\n"," <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n"," <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n"," </svg>\n"," </button>\n","\n"," <style>\n"," .colab-df-container {\n"," display:flex;\n"," gap: 12px;\n"," }\n","\n"," .colab-df-convert {\n"," background-color: #E8F0FE;\n"," border: none;\n"," border-radius: 50%;\n"," cursor: pointer;\n"," display: none;\n"," fill: #1967D2;\n"," height: 32px;\n"," padding: 0 0 0 0;\n"," width: 32px;\n"," }\n","\n"," .colab-df-convert:hover {\n"," background-color: #E2EBFA;\n"," box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n"," fill: #174EA6;\n"," }\n","\n"," .colab-df-buttons div {\n"," margin-bottom: 4px;\n"," }\n","\n"," [theme=dark] .colab-df-convert {\n"," background-color: #3B4455;\n"," fill: #D2E3FC;\n"," }\n","\n"," [theme=dark] .colab-df-convert:hover {\n"," background-color: #434B5C;\n"," box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n"," filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n"," fill: #FFFFFF;\n"," }\n"," </style>\n","\n"," <script>\n"," const buttonEl =\n"," document.querySelector('#df-5307d172-3d2c-44d8-912f-d0fd87dfca24 button.colab-df-convert');\n"," buttonEl.style.display =\n"," google.colab.kernel.accessAllowed ? 'block' : 'none';\n","\n"," async function convertToInteractive(key) {\n"," const element = document.querySelector('#df-5307d172-3d2c-44d8-912f-d0fd87dfca24');\n"," const dataTable =\n"," await google.colab.kernel.invokeFunction('convertToInteractive',\n"," [key], {});\n"," if (!dataTable) return;\n","\n"," const docLinkHtml = 'Like what you see? Visit the ' +\n"," '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n"," + ' to learn more about interactive tables.';\n"," element.innerHTML = '';\n"," dataTable['output_type'] = 'display_data';\n"," await google.colab.output.renderOutput(dataTable, element);\n"," const docLink = document.createElement('div');\n"," docLink.innerHTML = docLinkHtml;\n"," element.appendChild(docLink);\n"," }\n"," </script>\n"," </div>\n","\n","\n","<div id=\"df-3688d027-cab2-4cc2-9689-2c477354d7a3\">\n"," <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-3688d027-cab2-4cc2-9689-2c477354d7a3')\"\n"," title=\"Suggest charts\"\n"," style=\"display:none;\">\n","\n","<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n"," width=\"24px\">\n"," <g>\n"," <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n"," </g>\n","</svg>\n"," </button>\n","\n","<style>\n"," .colab-df-quickchart {\n"," --bg-color: #E8F0FE;\n"," --fill-color: #1967D2;\n"," --hover-bg-color: #E2EBFA;\n"," --hover-fill-color: #174EA6;\n"," --disabled-fill-color: #AAA;\n"," --disabled-bg-color: #DDD;\n"," }\n","\n"," [theme=dark] .colab-df-quickchart {\n"," --bg-color: #3B4455;\n"," --fill-color: #D2E3FC;\n"," --hover-bg-color: #434B5C;\n"," --hover-fill-color: #FFFFFF;\n"," --disabled-bg-color: #3B4455;\n"," --disabled-fill-color: #666;\n"," }\n","\n"," .colab-df-quickchart {\n"," background-color: var(--bg-color);\n"," border: none;\n"," border-radius: 50%;\n"," cursor: pointer;\n"," display: none;\n"," fill: var(--fill-color);\n"," height: 32px;\n"," padding: 0;\n"," width: 32px;\n"," }\n","\n"," .colab-df-quickchart:hover {\n"," background-color: var(--hover-bg-color);\n"," box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n"," fill: var(--button-hover-fill-color);\n"," }\n","\n"," .colab-df-quickchart-complete:disabled,\n"," .colab-df-quickchart-complete:disabled:hover {\n"," background-color: var(--disabled-bg-color);\n"," fill: var(--disabled-fill-color);\n"," box-shadow: none;\n"," }\n","\n"," .colab-df-spinner {\n"," border: 2px solid var(--fill-color);\n"," border-color: transparent;\n"," border-bottom-color: var(--fill-color);\n"," animation:\n"," spin 1s steps(1) infinite;\n"," }\n","\n"," @keyframes spin {\n"," 0% {\n"," border-color: transparent;\n"," border-bottom-color: var(--fill-color);\n"," border-left-color: var(--fill-color);\n"," }\n"," 20% {\n"," border-color: transparent;\n"," border-left-color: var(--fill-color);\n"," border-top-color: var(--fill-color);\n"," }\n"," 30% {\n"," border-color: transparent;\n"," border-left-color: var(--fill-color);\n"," border-top-color: var(--fill-color);\n"," border-right-color: var(--fill-color);\n"," }\n"," 40% {\n"," border-color: transparent;\n"," border-right-color: var(--fill-color);\n"," border-top-color: var(--fill-color);\n"," }\n"," 60% {\n"," border-color: transparent;\n"," border-right-color: var(--fill-color);\n"," }\n"," 80% {\n"," border-color: transparent;\n"," border-right-color: var(--fill-color);\n"," border-bottom-color: var(--fill-color);\n"," }\n"," 90% {\n"," border-color: transparent;\n"," border-bottom-color: var(--fill-color);\n"," }\n"," }\n","</style>\n","\n"," <script>\n"," async function quickchart(key) {\n"," const quickchartButtonEl =\n"," document.querySelector('#' + key + ' button');\n"," quickchartButtonEl.disabled = true; // To prevent multiple clicks.\n"," quickchartButtonEl.classList.add('colab-df-spinner');\n"," try {\n"," const charts = await google.colab.kernel.invokeFunction(\n"," 'suggestCharts', [key], {});\n"," } catch (error) {\n"," console.error('Error during call to suggestCharts:', error);\n"," }\n"," quickchartButtonEl.classList.remove('colab-df-spinner');\n"," quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n"," }\n"," (() => {\n"," let quickchartButtonEl =\n"," document.querySelector('#df-3688d027-cab2-4cc2-9689-2c477354d7a3 button');\n"," quickchartButtonEl.style.display =\n"," google.colab.kernel.accessAllowed ? 'block' : 'none';\n"," })();\n"," </script>\n","</div>\n","\n"," </div>\n"," </div>\n"],"application/vnd.google.colaboratory.intrinsic+json":{"type":"dataframe","variable_name":"test_data","summary":"{\n \"name\": \"test_data\",\n \"rows\": 418,\n \"fields\": [\n {\n \"column\": \"PassengerId\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 120,\n \"min\": 892,\n \"max\": 1309,\n \"num_unique_values\": 418,\n \"samples\": [\n 1213,\n 1216,\n 1280\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Pclass\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0,\n \"min\": 1,\n \"max\": 3,\n \"num_unique_values\": 3,\n \"samples\": [\n 3,\n 2,\n 1\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Name\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 418,\n \"samples\": [\n \"Krekorian, Mr. Neshan\",\n \"Kreuchen, Miss. Emilie\",\n \"Canavan, Mr. Patrick\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Sex\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 2,\n \"samples\": [\n \"female\",\n \"male\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Age\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 14.18120923562442,\n \"min\": 0.17,\n \"max\": 76.0,\n \"num_unique_values\": 79,\n \"samples\": [\n 10.0,\n 34.5\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"SibSp\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0,\n \"min\": 0,\n \"max\": 8,\n \"num_unique_values\": 7,\n \"samples\": [\n 0,\n 1\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Parch\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0,\n \"min\": 0,\n \"max\": 9,\n \"num_unique_values\": 8,\n \"samples\": [\n 1,\n 6\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Ticket\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 363,\n \"samples\": [\n \"2673\",\n \"W./C. 6607\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Fare\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 55.90757617997383,\n \"min\": 0.0,\n \"max\": 512.3292,\n \"num_unique_values\": 169,\n \"samples\": [\n 41.5792,\n 57.75\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Cabin\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 76,\n \"samples\": [\n \"A21\",\n \"E45\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Embarked\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 3,\n \"samples\": [\n \"Q\",\n \"S\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}"}},"metadata":{},"execution_count":7}],"execution_count":7},{"cell_type":"markdown","source":["As before, make sure that you see the output above in your notebook before continuing. \n","\n","Once all of the code runs successfully, all of the data (in **train.csv** and **test.csv**) is loaded in the notebook. (_The code above shows only the first 5 rows of each table, but all of the data is there -- all 891 rows of **train.csv** and all 418 rows of **test.csv**!_)\n","\n","# Part 3: Your first submission\n","\n","Remember our goal: we want to find patterns in **train.csv** that help us predict whether the passengers in **test.csv** survived.\n","\n","It might initially feel overwhelming to look for patterns, when there's so much data to sort through. So, we'll start simple.\n","\n","## Explore a pattern\n","\n","Remember that the sample submission file in **gender_submission.csv** assumes that all female passengers survived (and all male passengers died). \n","\n","Is this a reasonable first guess? We'll check if this pattern holds true in the data (in **train.csv**).\n","\n","Copy the code below into a new code cell. Then, run the cell."],"metadata":{"id":"97xkFTnWzht4"}},{"cell_type":"code","source":["women = train_data.loc[train_data.Sex == 'female'][\"Survived\"]\n","rate_women = sum(women)/len(women)\n","\n","print(\"% of women who survived:\", rate_women)"],"metadata":{"scrolled":true,"trusted":true,"execution":{"iopub.status.busy":"2025-01-02T06:53:03.671898Z","iopub.execute_input":"2025-01-02T06:53:03.672191Z","iopub.status.idle":"2025-01-02T06:53:03.681991Z","shell.execute_reply.started":"2025-01-02T06:53:03.672147Z","shell.execute_reply":"2025-01-02T06:53:03.681195Z"},"colab":{"base_uri":"https://localhost:8080/"},"id":"yKHux81Mzht4","executionInfo":{"status":"ok","timestamp":1735801415958,"user_tz":-60,"elapsed":247,"user":{"displayName":"Tongue Kevin","userId":"13768078595560270101"}},"outputId":"fdd79be6-808a-4c58-d8c9-1a20e6b3f2bf"},"outputs":[{"output_type":"stream","name":"stdout","text":["% of women who survived: 0.7420382165605095\n"]}],"execution_count":8},{"cell_type":"markdown","source":["Before moving on, make sure that your code returns the output above. The code above calculates the percentage of female passengers (in **train.csv**) who survived.\n","\n","Then, run the code below in another code cell:"],"metadata":{"id":"AGkp4d21zht5"}},{"cell_type":"code","source":["men = train_data.loc[train_data.Sex == 'male'][\"Survived\"]\n","rate_men = sum(men)/len(men)\n","\n","print(\"% of men who survived:\", rate_men)"],"metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-01-02T06:53:43.301002Z","iopub.execute_input":"2025-01-02T06:53:43.301335Z","iopub.status.idle":"2025-01-02T06:53:43.310418Z","shell.execute_reply.started":"2025-01-02T06:53:43.301276Z","shell.execute_reply":"2025-01-02T06:53:43.309589Z"},"colab":{"base_uri":"https://localhost:8080/"},"id":"GvQK7or2zht5","executionInfo":{"status":"ok","timestamp":1735801419768,"user_tz":-60,"elapsed":301,"user":{"displayName":"Tongue Kevin","userId":"13768078595560270101"}},"outputId":"c44ffffc-9bab-4ba1-f2d3-af44b78d3273"},"outputs":[{"output_type":"stream","name":"stdout","text":["% of men who survived: 0.18890814558058924\n"]}],"execution_count":9},{"cell_type":"markdown","source":["The code above calculates the percentage of male passengers (in **train.csv**) who survived.\n","\n","From this you can see that almost 75% of the women on board survived, whereas only 19% of the men lived to tell about it. Since gender seems to be such a strong indicator of survival, the submission file in **gender_submission.csv** is not a bad first guess!\n","\n","But at the end of the day, this gender-based submission bases its predictions on only a single column. As you can imagine, by considering multiple columns, we can discover more complex patterns that can potentially yield better-informed predictions. Since it is quite difficult to consider several columns at once (or, it would take a long time to consider all possible patterns in many different columns simultaneously), we'll use machine learning to automate this for us.\n","\n","## Your first machine learning model\n","\n","We'll build what's known as a **random forest model**. This model is constructed of several \"trees\" (there are three trees in the picture below, but we'll construct 100!) that will individually consider each passenger's data and vote on whether the individual survived. Then, the random forest model makes a democratic decision: the outcome with the most votes wins!\n","\n","\n","\n","The code cell below looks for patterns in four different columns (**\"Pclass\"**, **\"Sex\"**, **\"SibSp\"**, and **\"Parch\"**) of the data. It constructs the trees in the random forest model based on patterns in the **train.csv** file, before generating predictions for the passengers in **test.csv**. The code also saves these new predictions in a CSV file **submission.csv**.\n","\n","Copy this code into your notebook, and run it in a new code cell."],"metadata":{"id":"BEfci2WXzht5"}},{"cell_type":"code","source":["from sklearn.ensemble import RandomForestClassifier\n","\n","y = train_data[\"Survived\"]\n","\n","features = [\"Pclass\", \"Sex\", \"SibSp\", \"Parch\"]\n","X = pd.get_dummies(train_data[features])\n","X_test = pd.get_dummies(test_data[features])\n","\n","model = RandomForestClassifier(n_estimators=100, max_depth=5, random_state=1)\n","model.fit(X, y)\n","predictions = model.predict(X_test)\n","\n","output = pd.DataFrame({'PassengerId': test_data.PassengerId, 'Survived': predictions})\n","output.to_csv('submission.csv', index=False)\n","print(\"Your submission was successfully saved!\")"],"metadata":{"_kg_hide-output":false,"trusted":true,"execution":{"iopub.status.busy":"2025-01-02T06:55:47.559031Z","iopub.execute_input":"2025-01-02T06:55:47.559330Z","iopub.status.idle":"2025-01-02T06:55:50.899553Z","shell.execute_reply.started":"2025-01-02T06:55:47.559284Z","shell.execute_reply":"2025-01-02T06:55:50.898540Z"},"colab":{"base_uri":"https://localhost:8080/"},"id":"VAzizcF-zht6","executionInfo":{"status":"ok","timestamp":1735801428676,"user_tz":-60,"elapsed":3573,"user":{"displayName":"Tongue Kevin","userId":"13768078595560270101"}},"outputId":"0610dd25-3852-4e67-fe1e-0759f888f81d"},"outputs":[{"output_type":"stream","name":"stdout","text":["Your submission was successfully saved!\n"]}],"execution_count":10},{"cell_type":"markdown","source":["Make sure that your notebook outputs the same message above (`Your submission was successfully saved!`) before moving on.\n","> Again, don't worry if this code doesn't make sense to you! For now, we'll focus on how to generate and submit predictions.\n","\n","Once you're ready, click on the **\"Save Version\"** button in the top right corner of your notebook. This will generate a pop-up window. \n","- Ensure that the **\"Save and Run All\"** option is selected, and then click on the **\"Save\"** button.\n","- This generates a window in the bottom left corner of the notebook. After it has finished running, click on the number to the right of the **\"Save Version\"** button. This pulls up a list of versions on the right of the screen. Click on the ellipsis **(...)** to the right of the most recent version, and select **Open in Viewer**. \n","- Click on the **Data** tab on the top of the screen. Then, click on the **\"Submit\"** button to submit your results.\n","\n","\n","\n","Congratulations for making your first submission to a Kaggle competition! Within ten minutes, you should receive a message providing your spot on the leaderboard. Great work!"],"metadata":{"id":"IIDjdAQWzht6"}},{"cell_type":"markdown","source":["# Part 4: Learn more!\n","\n","If you're interested in learning more, we strongly suggest our (3-hour) **[Intro to Machine Learning](https://www.kaggle.com/learn/intro-to-machine-learning)** course, which will help you fully understand all of the code that we've presented here. You'll also know enough to generate even better predictions!"],"metadata":{"id":"CS5HBHkmzht6"}}]} |
Xet Storage Details
- Size:
- 48.6 kB
- Xet hash:
- ec46735dd088c78003acc77255ead850bf8124d8200e5d7c1019a6884ebd040a
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.