Search is not available for this dataset
text
stringlengths
1.42k
99.1M
id
stringlengths
21
24
file_path
stringclasses
46 values
{ "cells": [ { "cell_type": "markdown", "id": "145de7c9", "metadata": { "papermill": { "duration": 0.038294, "end_time": "2021-08-24T18:33:41.181818", "exception": false, "start_time": "2021-08-24T18:33:41.143524", "status": "completed" }, "tags": [] }, "source": [ "# Problem Statement\n", "\n", "The head of HR of a certain organization wants to automate their salary hike estimation. The organization consulted an analytics service provider and asked them to build a basic prediction model by providing them with a dataset that contains the data about the number of years of experience and the salary hike given accordingly. Build a Simple Linear Regression model with salary as the target variable.\n", "\n", "Definition of Variable -:\n", "\n", "1. Year of Experience (Input)\n", "2. Salary Hike -> Hike in salary (Target)\n" ] }, { "cell_type": "markdown", "id": "e5afb14c", "metadata": { "papermill": { "duration": 0.036479, "end_time": "2021-08-24T18:33:41.256896", "exception": false, "start_time": "2021-08-24T18:33:41.220417", "status": "completed" }, "tags": [] }, "source": [ "# Approach to Solve the Business Case -:\n", "1. Business Objective - Find Relationship between Salary Hike and Year of Experience\n", "2. Perform EDA on data (Outlier, Missing Values).\n", "3. Understand the relationship between the variable's using Scatter Plot.\n", "4. Apply Simple linear regression with OLE to create base regression model( Vanilla Model)\n", "5. Check the RMSE, R^2 & R values for the model.\n", "5. Compare the Vanilla model with Model with Transformation's to check the best fit model.\n", " Transformation used\n", " 1. Logarithmic\n", " 2. Exponential\n", " 3. Polynomial with degree 2\n", "6. After comparing RMSE, R^2 & R values, Select the best model.\n", "7. Train & Test your data on these model to check the performance of model on test data.\n", "\n" ] }, { "cell_type": "code", "execution_count": 1, "id": "7c8a58fe", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:33:41.355760Z", "iopub.status.busy": "2021-08-24T18:33:41.345678Z", "iopub.status.idle": "2021-08-24T18:33:42.274231Z", "shell.execute_reply": "2021-08-24T18:33:42.272656Z", "shell.execute_reply.started": "2021-08-24T18:28:29.916029Z" }, "papermill": { "duration": 0.971429, "end_time": "2021-08-24T18:33:42.274538", "exception": true, "start_time": "2021-08-24T18:33:41.303109", "status": "failed" }, "tags": [] }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "UsageError: Line magic function `%` not found.\n" ] } ], "source": [ "#Import Library\n", "import pandas as pd\n", "import numpy as np\n", "import seaborn as sns\n", "import matplotlib.pyplot as plt\n", "% matplotlib inline\n", "import statsmodels.formula.api as smf\n" ] }, { "cell_type": "code", "execution_count": null, "id": "8181f09e", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:28:31.375993Z", "iopub.status.busy": "2021-08-24T18:28:31.375240Z", "iopub.status.idle": "2021-08-24T18:28:31.387388Z", "shell.execute_reply": "2021-08-24T18:28:31.386508Z", "shell.execute_reply.started": "2021-08-24T18:28:31.375936Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "#Import the dataset\n", "sal = pd.read_csv(\"../input/salary/Salary.csv\")" ] }, { "cell_type": "code", "execution_count": null, "id": "42db0d3d", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:28:33.377308Z", "iopub.status.busy": "2021-08-24T18:28:33.375351Z", "iopub.status.idle": "2021-08-24T18:28:33.387130Z", "shell.execute_reply": "2021-08-24T18:28:33.386152Z", "shell.execute_reply.started": "2021-08-24T18:28:33.377271Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "#Check the data\n", "sal.head()" ] }, { "cell_type": "markdown", "id": "fcd7a320", "metadata": { "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "source": [ "Change the Column Label to short Abbrevation for ease of Code handling.\n", "Weight gained (grams) - wg\n", "Calories Consumed - cc" ] }, { "cell_type": "markdown", "id": "b63802b6", "metadata": { "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "source": [ "### Rename Column for Ease of Coding" ] }, { "cell_type": "code", "execution_count": null, "id": "e326b80b", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:28:35.875585Z", "iopub.status.busy": "2021-08-24T18:28:35.875250Z", "iopub.status.idle": "2021-08-24T18:28:35.887145Z", "shell.execute_reply": "2021-08-24T18:28:35.886321Z", "shell.execute_reply.started": "2021-08-24T18:28:35.875553Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "sal = sal.rename(columns={\"Salary\":\"hike\",\"YearsExperience\":\"years\"})\n", "sal.head(5)\n" ] }, { "cell_type": "markdown", "id": "73141ddd", "metadata": { "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "source": [ "# 2. Perform EDA on data (Outlier, Missing Values)" ] }, { "cell_type": "markdown", "id": "9edccd42", "metadata": { "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "source": [ "#Exploratory Data Analysis\n", "1. Check for the null Values in dataset.\n", "2. Check for the outlier in dataset\n" ] }, { "cell_type": "code", "execution_count": null, "id": "b3c7ded2", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:28:39.015306Z", "iopub.status.busy": "2021-08-24T18:28:39.014992Z", "iopub.status.idle": "2021-08-24T18:28:39.029879Z", "shell.execute_reply": "2021-08-24T18:28:39.028852Z", "shell.execute_reply.started": "2021-08-24T18:28:39.015280Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "# Check for Null Data - No Null values\n", "sal.info()" ] }, { "cell_type": "code", "execution_count": null, "id": "c4369be2", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:28:41.355559Z", "iopub.status.busy": "2021-08-24T18:28:41.355231Z", "iopub.status.idle": "2021-08-24T18:28:41.373607Z", "shell.execute_reply": "2021-08-24T18:28:41.372617Z", "shell.execute_reply.started": "2021-08-24T18:28:41.355531Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "sal.describe()" ] }, { "cell_type": "code", "execution_count": null, "id": "c99b170a", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:28:43.395591Z", "iopub.status.busy": "2021-08-24T18:28:43.395282Z", "iopub.status.idle": "2021-08-24T18:28:43.594317Z", "shell.execute_reply": "2021-08-24T18:28:43.593701Z", "shell.execute_reply.started": "2021-08-24T18:28:43.395563Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "#Plot Histogram to view Distribution of data field ( Univariate)\n", "sns.histplot(sal[\"hike\"], color ='green',kde=True)" ] }, { "cell_type": "code", "execution_count": null, "id": "b8d583c5", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:28:45.890783Z", "iopub.status.busy": "2021-08-24T18:28:45.890295Z", "iopub.status.idle": "2021-08-24T18:28:46.063523Z", "shell.execute_reply": "2021-08-24T18:28:46.062873Z", "shell.execute_reply.started": "2021-08-24T18:28:45.890751Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "#Plot Histogram to view Distribution of data field ( Univariate) \n", "sns.histplot(sal[\"years\"], color ='blue',kde=True)" ] }, { "cell_type": "markdown", "id": "7bd0ca60", "metadata": { "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "source": [ "#Outlier Identification\n", "Use BoxPlot to Identify any outlier in data" ] }, { "cell_type": "code", "execution_count": null, "id": "79e7c86b", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:28:47.955671Z", "iopub.status.busy": "2021-08-24T18:28:47.955171Z", "iopub.status.idle": "2021-08-24T18:28:48.073727Z", "shell.execute_reply": "2021-08-24T18:28:48.072628Z", "shell.execute_reply.started": "2021-08-24T18:28:47.955641Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "sns.boxplot(sal[\"hike\"], color ='green')\n", "# No Outlier found based on the boxplot analysis" ] }, { "cell_type": "code", "execution_count": null, "id": "2a7a75a8", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:28:50.315537Z", "iopub.status.busy": "2021-08-24T18:28:50.315211Z", "iopub.status.idle": "2021-08-24T18:28:50.439779Z", "shell.execute_reply": "2021-08-24T18:28:50.439078Z", "shell.execute_reply.started": "2021-08-24T18:28:50.315508Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "sns.boxplot(sal[\"years\"], color ='blue')\n", "# No Outlier found based on the boxplot analysis" ] }, { "cell_type": "markdown", "id": "f3fac17e", "metadata": { "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "source": [ "# 3. Apply Simple linear regression with OLS to create different regression model.\n" ] }, { "cell_type": "markdown", "id": "4de2792a", "metadata": { "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "source": [ "## 3.1 Model -1 - Vanilla Model ( No Transformation) - y = ax+b" ] }, { "cell_type": "code", "execution_count": null, "id": "f6c98b87", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:28:54.135631Z", "iopub.status.busy": "2021-08-24T18:28:54.135174Z", "iopub.status.idle": "2021-08-24T18:28:54.307238Z", "shell.execute_reply": "2021-08-24T18:28:54.306336Z", "shell.execute_reply.started": "2021-08-24T18:28:54.135598Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "#Check the relation between Variable by Scatter Plot & Correlation Coefficient.\n", "sns.scatterplot(y=\"hike\",x=\"years\",data=sal, color = \"purple\" )\n", "#Relation Type = Linear\n", "#Direction - Positive Correlation\n", "#Strength -Can't Comment\n" ] }, { "cell_type": "code", "execution_count": null, "id": "91d59575", "metadata": { "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "# Find the Correlation Coefficient (R) for the relation\n", "# R tells the magnitude of strength of relation between y & x" ] }, { "cell_type": "code", "execution_count": null, "id": "d8b3b8da", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:28:58.835548Z", "iopub.status.busy": "2021-08-24T18:28:58.835206Z", "iopub.status.idle": "2021-08-24T18:28:58.843500Z", "shell.execute_reply": "2021-08-24T18:28:58.842326Z", "shell.execute_reply.started": "2021-08-24T18:28:58.835515Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "np.corrcoef(sal[\"years\"],sal[\"hike\"])\n", "# R value is above 0.85 means Correlation strength is High." ] }, { "cell_type": "code", "execution_count": null, "id": "21e210a8", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:29:00.675497Z", "iopub.status.busy": "2021-08-24T18:29:00.675140Z", "iopub.status.idle": "2021-08-24T18:29:00.776748Z", "shell.execute_reply": "2021-08-24T18:29:00.775787Z", "shell.execute_reply.started": "2021-08-24T18:29:00.675464Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "#Use OLS & fit model on data\n", "import statsmodels.formula.api as smf\n", "model1= smf.ols('hike~years',data = sal).fit()\n", "model1.summary()" ] }, { "cell_type": "code", "execution_count": null, "id": "ca6874d2", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:29:03.995742Z", "iopub.status.busy": "2021-08-24T18:29:03.995407Z", "iopub.status.idle": "2021-08-24T18:29:04.283614Z", "shell.execute_reply": "2021-08-24T18:29:04.282947Z", "shell.execute_reply.started": "2021-08-24T18:29:03.995710Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "# Predict Regression Line Model1\n", "pred1 = model1.predict(pd.DataFrame(sal['years']))\n", "plt.scatter(x=\"years\",y=\"hike\",data=sal, color = \"purple\" )\n", "plt.plot(sal['years'],pred1)\n", "plt.legend(['Predicted line', 'Observed data'])\n", "plt.xlabel('years')\n", "plt.ylabel('Hike')\n", "plt.show()" ] }, { "cell_type": "code", "execution_count": null, "id": "36535505", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:29:06.500690Z", "iopub.status.busy": "2021-08-24T18:29:06.500185Z", "iopub.status.idle": "2021-08-24T18:29:06.508140Z", "shell.execute_reply": "2021-08-24T18:29:06.507161Z", "shell.execute_reply.started": "2021-08-24T18:29:06.500642Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "# RMSE Error calculation (Model-1)\n", "res1 = sal.hike - pred1\n", "res_sqr1 = res1 * res1\n", "mse1 = np.mean(res_sqr1)\n", "rmse1 = np.sqrt(mse1)\n", "rmse1" ] }, { "cell_type": "markdown", "id": "e788491d", "metadata": { "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "source": [ "## 3.2 Model 2 {Log Transformation}, x = log(years); y = hike\n" ] }, { "cell_type": "code", "execution_count": null, "id": "653a3231", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:29:08.441879Z", "iopub.status.busy": "2021-08-24T18:29:08.441489Z", "iopub.status.idle": "2021-08-24T18:29:08.597219Z", "shell.execute_reply": "2021-08-24T18:29:08.596362Z", "shell.execute_reply.started": "2021-08-24T18:29:08.441847Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "#Check the relation between Variable by Scatter Plot & Correlation Coefficient.\n", "plt.scatter(x = np.log(sal['years']), y = sal['hike'], color = 'brown')\n", "np.corrcoef(np.log(sal['years']),sal['hike'] ) #correlation\n" ] }, { "cell_type": "code", "execution_count": null, "id": "02855b4e", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:29:10.356562Z", "iopub.status.busy": "2021-08-24T18:29:10.356189Z", "iopub.status.idle": "2021-08-24T18:29:10.381588Z", "shell.execute_reply": "2021-08-24T18:29:10.380729Z", "shell.execute_reply.started": "2021-08-24T18:29:10.356527Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "#Use OLS & fit model on data\n", "model2= smf.ols('hike ~ np.log(years)',data = sal).fit()\n", "model2.summary()\n" ] }, { "cell_type": "code", "execution_count": null, "id": "e48bc19e", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:29:13.498737Z", "iopub.status.busy": "2021-08-24T18:29:13.498399Z", "iopub.status.idle": "2021-08-24T18:29:13.683532Z", "shell.execute_reply": "2021-08-24T18:29:13.682890Z", "shell.execute_reply.started": "2021-08-24T18:29:13.498709Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "# Predict Regression Line for Model-2\n", "pred2 = model2.predict(pd.DataFrame(sal['years']))\n", "plt.scatter(x=np.log(sal[\"years\"]),y=\"hike\",data= sal, color = \"purple\" )\n", "plt.plot(np.log(sal['years']),pred2)\n", "plt.legend(['Predicted line', 'Observed data'])\n", "plt.xlabel('log(Years Experience)')\n", "plt.ylabel('Salary Hike')\n", "plt.show()" ] }, { "cell_type": "code", "execution_count": null, "id": "230617ee", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:29:16.276591Z", "iopub.status.busy": "2021-08-24T18:29:16.276135Z", "iopub.status.idle": "2021-08-24T18:29:16.284489Z", "shell.execute_reply": "2021-08-24T18:29:16.283763Z", "shell.execute_reply.started": "2021-08-24T18:29:16.276562Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "# RMSE Error calculation for Model-2\n", "res2 = sal.hike- pred2\n", "res_sqr2 = res2 * res2\n", "mse2 = np.mean(res_sqr2)\n", "rmse2 = np.sqrt(mse2)\n", "rmse2" ] }, { "cell_type": "markdown", "id": "6a0d0c66", "metadata": { "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "source": [ "## 3.3 Model-3 {Exponential Method}, y=log(hike), x=year" ] }, { "cell_type": "code", "execution_count": null, "id": "390b5c4e", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:29:19.276059Z", "iopub.status.busy": "2021-08-24T18:29:19.275549Z", "iopub.status.idle": "2021-08-24T18:29:19.443888Z", "shell.execute_reply": "2021-08-24T18:29:19.442765Z", "shell.execute_reply.started": "2021-08-24T18:29:19.276024Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "#Check the relation between Variable by Scatter Plot & Correlation Coefficient.\n", "plt.scatter(x = sal['years'], y= np.log(sal['hike']), color = 'brown') # Scatter Plot for checking relation.\n", "np.corrcoef(sal['years'],np.log(sal['hike']) ) #correlation" ] }, { "cell_type": "code", "execution_count": null, "id": "9ea54099", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:29:22.616519Z", "iopub.status.busy": "2021-08-24T18:29:22.616174Z", "iopub.status.idle": "2021-08-24T18:29:22.640056Z", "shell.execute_reply": "2021-08-24T18:29:22.639023Z", "shell.execute_reply.started": "2021-08-24T18:29:22.616485Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "#Use OLS & fit model on data\n", "import statsmodels.formula.api as smf\n", "model3= smf.ols('np.log(hike) ~ years',data = sal).fit()\n", "model3.summary()" ] }, { "cell_type": "code", "execution_count": null, "id": "251bb5d7", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:29:25.630629Z", "iopub.status.busy": "2021-08-24T18:29:25.630270Z", "iopub.status.idle": "2021-08-24T18:29:25.823114Z", "shell.execute_reply": "2021-08-24T18:29:25.822392Z", "shell.execute_reply.started": "2021-08-24T18:29:25.630587Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "# Predict Regression Line for Model-3\n", "pred3 = model3.predict(pd.DataFrame(sal['years']))\n", "pred3_exp = np.exp(pred3)\n", "plt.scatter(x =(sal['years']), y = np.log(sal['hike']), color = 'brown')\n", "plt.plot(sal['years'],pred3)\n", "plt.legend(['Predicted line', 'Observed data'])\n", "plt.xlabel('Years Experience')\n", "plt.ylabel('log(Salary Hike)')\n", "plt.show()\n" ] }, { "cell_type": "code", "execution_count": null, "id": "54a33425", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:29:28.176426Z", "iopub.status.busy": "2021-08-24T18:29:28.175928Z", "iopub.status.idle": "2021-08-24T18:29:28.184202Z", "shell.execute_reply": "2021-08-24T18:29:28.183122Z", "shell.execute_reply.started": "2021-08-24T18:29:28.176382Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "# RMSE Error calculation\n", "res3 = sal.hike - pred3_exp\n", "res_sqr3 = res3 * res3\n", "mse3 = np.mean(res_sqr3)\n", "rmse3 = np.sqrt(mse3)\n", "rmse3" ] }, { "cell_type": "markdown", "id": "e440d4f2", "metadata": { "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "source": [ "## 3.4 Model-4 Polynomial of Transformation of Degree 2 ( Quadratic) , y=ax^2+bx+c --> {x = years ; x^2 = (years)^2 ; y = hike}" ] }, { "cell_type": "code", "execution_count": null, "id": "e1fd67e2", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:29:30.355392Z", "iopub.status.busy": "2021-08-24T18:29:30.355061Z", "iopub.status.idle": "2021-08-24T18:29:30.381313Z", "shell.execute_reply": "2021-08-24T18:29:30.380425Z", "shell.execute_reply.started": "2021-08-24T18:29:30.355364Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "#Use OLS & fit model on data\n", "model4 = smf.ols('hike ~ years + I(years*years)', data = sal).fit()\n", "model4.summary()" ] }, { "cell_type": "code", "execution_count": null, "id": "bb571357", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:29:33.275265Z", "iopub.status.busy": "2021-08-24T18:29:33.274917Z", "iopub.status.idle": "2021-08-24T18:29:33.284717Z", "shell.execute_reply": "2021-08-24T18:29:33.284005Z", "shell.execute_reply.started": "2021-08-24T18:29:33.275237Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "pred4 = model4.predict(pd.DataFrame(sal))\n", "X = sal.iloc[:, 0:1].values\n" ] }, { "cell_type": "code", "execution_count": null, "id": "32b677c2", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:29:35.375797Z", "iopub.status.busy": "2021-08-24T18:29:35.375247Z", "iopub.status.idle": "2021-08-24T18:29:35.571750Z", "shell.execute_reply": "2021-08-24T18:29:35.571105Z", "shell.execute_reply.started": "2021-08-24T18:29:35.375745Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "plt.scatter(sal.years,sal.hike)\n", "plt.plot(X, pred4, color = 'red')\n", "plt.legend(['Predicted line', 'Observed data'])\n", "plt.show()" ] }, { "cell_type": "code", "execution_count": null, "id": "75b12d63", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:29:37.760775Z", "iopub.status.busy": "2021-08-24T18:29:37.760219Z", "iopub.status.idle": "2021-08-24T18:29:37.769205Z", "shell.execute_reply": "2021-08-24T18:29:37.768156Z", "shell.execute_reply.started": "2021-08-24T18:29:37.760727Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "# Error calculation\n", "res4 = sal.hike - pred4\n", "res_sqr4 = res4 * res4\n", "mse4 = np.mean(res_sqr4)\n", "rmse4 = np.sqrt(mse4)\n", "rmse4" ] }, { "cell_type": "code", "execution_count": null, "id": "455dd0d5", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:29:40.715527Z", "iopub.status.busy": "2021-08-24T18:29:40.715157Z", "iopub.status.idle": "2021-08-24T18:29:40.728079Z", "shell.execute_reply": "2021-08-24T18:29:40.727027Z", "shell.execute_reply.started": "2021-08-24T18:29:40.715497Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "# Choose the best model using RMSE\n", "data = {\"MODEL\":pd.Series([\"SLR\", \"Log model\", \"Exp model\", \"Poly model\"]), \"RMSE\":pd.Series([rmse1, rmse2, rmse3, rmse4])}\n", "table_rmse = pd.DataFrame(data)\n", "table_rmse" ] }, { "cell_type": "code", "execution_count": null, "id": "d6c38340", "metadata": { "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "#Althought the R^2 & RMSE value is higher for Polynomial model but it is having p value higher than 5% Hence we will neglect this model.\n", "#Our Best model is Base Model with No transfomation.( Vanilla Model)" ] }, { "cell_type": "markdown", "id": "6b5fc47e", "metadata": { "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "source": [ "# 4. Best Model Selection from 4 Model tested Based on R , R^2 & RMSE Values" ] }, { "cell_type": "markdown", "id": "f40121eb", "metadata": { "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "source": [] }, { "attachments": { "55bb7677-6746-4869-b22f-f446ee366c30.png": { "image/png": "iVBORw0KGgoAAAANSUhEUgAABDIAAAB6CAIAAADCj+RlAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAADvRSURBVHhe7X07suVGrq2GUlaZipBZZdcAZMiQV5ZqBjJKPYcOdUSbPYG2b4SsO4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beeGfmW3K5NePl2N7dRaSMmOkJjxXb5bz8S3VogQCKo6ho6Hhv0MyRERi7VgrKnLh0WMlFNQAPPKxa7E09oLzHf6OIz5JAIHAIbrLXLphmnHITRHEC18Qb78xy0y5oF268MjPqBIo3YbxVjxRFQqB9o8gkqspuTIBWGxhBRywCMgpVXaSriWZKe5AJw1fyNQhGm+DRKI63gvgsCQQCh+Ame+2CacYpN0EUJ3BNvPHO1DdodYE2yBP+TVrGI0XRE/S39/o4iEqPUDdDq42MaN0a8Di6Kt4s4AA8iIrhN/nqC1DcWktvEPFZEggEDsFN9toF04xTboIoTuCaeOOdObi7a7ZAXayVXnkaKXr3biMLIpOoGhwvWm1gxI+l54l6HokBFQ8q1QnDH8oLevdvDvFZEggEDsFN9toF04xTboIoTuCaeOOdqW/KcvVmfhkiSMC7PcOteqCYRCof/m4JiBojTlQD7w3a4MCIctSghRnA4SGhzoupNFHZ/FD47AFF8KFGoeCF9MYQnyWBQOAQ3GSvXTDNOOUmiOIErok33pl8UZb7MNzd64W6ovL5At2ATLHiKwK7sionP4ORYVSud4EyODWSJ9CciGagerLbBMCUMoHx1EhYjcYyJROMPqQ3i/gsCQQCh+Ame+2CacYpN0EUJ3BN3Koz+U4Nl291Pz8er/UemCM+SwKBwCG4yV67YJpxyk0QxQlcE7fqTP1DffOZcDhe6z0wR3yWBAKBQ3CTvXbBNOOUmyCKE7gmbtaZ6s8gnf5V8FrvgRnisyQQCByCm+y1C6YZp9wEUZzANRGdGQgQ+LOENkMgEAgEAoFAIBAIvAzl8yQQCAQCgUAgEAgEXoL//vf/AFb/ro41ICnlAAAAAElFTkSuQmCC" } }, "cell_type": "markdown", "id": "3e250a8e", "metadata": { "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "source": [ "![salary.png](attachment:55bb7677-6746-4869-b22f-f446ee366c30.png)" ] }, { "cell_type": "markdown", "id": "f68bfc47", "metadata": { "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "source": [ "## 4.1. BEST MODEL - Vanilla Model ( y=mx+c,No Tranformation)" ] }, { "cell_type": "markdown", "id": "dfa181f5", "metadata": { "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "source": [ "# 5. Train & Test your data on the Best model to check the performance of model on test data" ] }, { "cell_type": "code", "execution_count": null, "id": "107a0dd2", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:31:46.495793Z", "iopub.status.busy": "2021-08-24T18:31:46.495308Z", "iopub.status.idle": "2021-08-24T18:31:46.519385Z", "shell.execute_reply": "2021-08-24T18:31:46.518721Z", "shell.execute_reply.started": "2021-08-24T18:31:46.495751Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "from sklearn.model_selection import train_test_split\n", "\n", "train, test = train_test_split(sal, test_size = 0.25,random_state=6)\n", "\n", "finalmodel = smf.ols('hike ~ years', data = train).fit()\n", "finalmodel.summary()" ] }, { "cell_type": "code", "execution_count": null, "id": "130096fb", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:30:07.301482Z", "iopub.status.busy": "2021-08-24T18:30:07.300762Z", "iopub.status.idle": "2021-08-24T18:30:07.311575Z", "shell.execute_reply": "2021-08-24T18:30:07.310671Z", "shell.execute_reply.started": "2021-08-24T18:30:07.301443Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "# Prediction on train data\n", "train_pred = finalmodel.predict(pd.DataFrame(train))\n", "train_pred \n" ] }, { "cell_type": "code", "execution_count": null, "id": "484bdf14", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:30:10.175458Z", "iopub.status.busy": "2021-08-24T18:30:10.175124Z", "iopub.status.idle": "2021-08-24T18:30:10.182500Z", "shell.execute_reply": "2021-08-24T18:30:10.181577Z", "shell.execute_reply.started": "2021-08-24T18:30:10.175430Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "# Model Evaluation on train data\n", "train_res = train.hike - train_pred\n", "train_sqrs = train_res * train_res\n", "train_mse = np.mean(train_sqrs)\n", "train_rmse = np.sqrt(train_mse)\n", "train_rmse" ] }, { "cell_type": "code", "execution_count": null, "id": "4c80bd97", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:30:14.616330Z", "iopub.status.busy": "2021-08-24T18:30:14.615942Z", "iopub.status.idle": "2021-08-24T18:30:14.625987Z", "shell.execute_reply": "2021-08-24T18:30:14.625048Z", "shell.execute_reply.started": "2021-08-24T18:30:14.616302Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "# Predict on test data\n", "test_pred = finalmodel.predict(pd.DataFrame(test))\n", "test_pred\n" ] }, { "cell_type": "code", "execution_count": null, "id": "9623b027", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:30:18.496575Z", "iopub.status.busy": "2021-08-24T18:30:18.496043Z", "iopub.status.idle": "2021-08-24T18:30:18.504268Z", "shell.execute_reply": "2021-08-24T18:30:18.503206Z", "shell.execute_reply.started": "2021-08-24T18:30:18.496540Z" }, "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "outputs": [], "source": [ "# Model Evaluation on Test data\n", "test_res = test.hike - test_pred\n", "test_sqrs = test_res * test_res\n", "test_mse = np.mean(test_sqrs)\n", "test_rmse = np.sqrt(test_mse)\n", "test_rmse" ] }, { "cell_type": "markdown", "id": "41983047", "metadata": { "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "source": [ "# 6 Final Observation\n", "Although Train data is giving better result than test data hence it looks like an overfit model. \n", "But since the RMSE value of Train & Test data is very Close, it can be Inferred Model will perform well in real life scenario with Unknown Data. \n", "Hence, we can predict the Salary Hike with higher accuracy based on Year’s of Experience data.\n", "\n", "\n", "# Final R^2 Value = 97.3%" ] }, { "cell_type": "markdown", "id": "4b4a6793", "metadata": { "papermill": { "duration": null, "end_time": null, "exception": null, "start_time": null, "status": "pending" }, "tags": [] }, "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.10" }, "papermill": { "default_parameters": {}, "duration": 10.836974, "end_time": "2021-08-24T18:33:43.874398", "environment_variables": {}, "exception": true, "input_path": "__notebook__.ipynb", "output_path": "__notebook__.ipynb", "parameters": {}, "start_time": "2021-08-24T18:33:33.037424", "version": "2.3.3" } }, "nbformat": 4, "nbformat_minor": 5 }
0072/954/72954764.ipynb
s3://data-agents/kaggle-outputs/sharded/025_00072.jsonl.gz
{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "3fa48887", "metadata": { "_cell_guid": "b1076dfc-b9ad-4769-8c92-a6c4dae69d19", "_uuid": "8f2839f25d086af736a60e9eeb907d3b93b6e0e5", "execution": { "iopub.execute_input": "2021-08-24T18:34:01.719783Z", "iopub.status.busy": "2021-08-24T18:34:01.718063Z", "iopub.status.idle": "2021-08-24T18:34:02.991883Z", "shell.execute_reply": "2021-08-24T18:34:02.992444Z", "shell.execute_reply.started": "2021-08-22T07:53:37.022716Z" }, "papermill": { "duration": 1.29219, "end_time": "2021-08-24T18:34:02.992778", "exception": false, "start_time": "2021-08-24T18:34:01.700588", "status": "completed" }, "tags": [] }, "outputs": [], "source": [ "import numpy as np\n", "import pandas as pd\n", "from sklearn.model_selection import KFold\n", "from sklearn.metrics import mean_squared_error\n", "from sklearn.preprocessing import OrdinalEncoder\n", "from xgboost import XGBRegressor\n", "import warnings\n", "warnings.filterwarnings('ignore')" ] }, { "cell_type": "code", "execution_count": 2, "id": "f5270513", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:34:03.013045Z", "iopub.status.busy": "2021-08-24T18:34:03.012375Z", "iopub.status.idle": "2021-08-24T18:34:07.911390Z", "shell.execute_reply": "2021-08-24T18:34:07.910351Z", "shell.execute_reply.started": "2021-08-22T07:53:38.097201Z" }, "papermill": { "duration": 4.910101, "end_time": "2021-08-24T18:34:07.911571", "exception": false, "start_time": "2021-08-24T18:34:03.001470", "status": "completed" }, "tags": [] }, "outputs": [], "source": [ "train=pd.read_csv('../input/30-days-of-ml/train.csv').drop('id',axis=1)\n", "test=pd.read_csv('../input/30-days-of-ml/test.csv').drop('id',axis=1)\n", "sample=pd.read_csv('../input/30-days-of-ml/sample_submission.csv')" ] }, { "cell_type": "code", "execution_count": 3, "id": "c0056fc5", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:34:07.934236Z", "iopub.status.busy": "2021-08-24T18:34:07.932945Z", "iopub.status.idle": "2021-08-24T18:34:07.936061Z", "shell.execute_reply": "2021-08-24T18:34:07.935533Z", "shell.execute_reply.started": "2021-08-22T07:53:42.319707Z" }, "papermill": { "duration": 0.01685, "end_time": "2021-08-24T18:34:07.936215", "exception": false, "start_time": "2021-08-24T18:34:07.919365", "status": "completed" }, "tags": [] }, "outputs": [], "source": [ "object_col=[col for col in train.columns if 'cat' in col]" ] }, { "cell_type": "code", "execution_count": 4, "id": "bac6b141", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:34:07.958424Z", "iopub.status.busy": "2021-08-24T18:34:07.957725Z", "iopub.status.idle": "2021-08-24T18:34:07.962767Z", "shell.execute_reply": "2021-08-24T18:34:07.962094Z", "shell.execute_reply.started": "2021-08-22T07:53:42.325814Z" }, "papermill": { "duration": 0.018904, "end_time": "2021-08-24T18:34:07.962934", "exception": false, "start_time": "2021-08-24T18:34:07.944030", "status": "completed" }, "tags": [] }, "outputs": [], "source": [ "xgb_params = {\n", " #'tree_method':'gpu_hist', ## parameters for gpu\n", " #'gpu_id':0, #\n", " #'predictor':'gpu_predictor', #\n", " 'n_estimators': 10000,\n", " 'learning_rate': 0.03628302216953097,\n", " 'subsample': 0.7875490025178415,\n", " 'colsample_bytree': 0.11807135201147481,\n", " 'max_depth': 3,\n", " 'booster': 'gbtree', \n", " 'reg_lambda': 0.0008746338866473539,\n", " 'reg_alpha': 23.13181079976304,\n", " 'n_jobs':-1,\n", " 'random_state':40\n", "}" ] }, { "cell_type": "code", "execution_count": 5, "id": "ddb80e65", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T18:34:07.991336Z", "iopub.status.busy": "2021-08-24T18:34:07.990423Z", "iopub.status.idle": "2021-08-24T19:17:59.674476Z", "shell.execute_reply": "2021-08-24T19:17:59.675225Z", "shell.execute_reply.started": "2021-08-22T07:54:06.984688Z" }, "papermill": { "duration": 2631.704809, "end_time": "2021-08-24T19:17:59.675635", "exception": false, "start_time": "2021-08-24T18:34:07.970826", "status": "completed" }, "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[0]\tvalidation_0-rmse:7.50024\n", "[2000]\tvalidation_0-rmse:0.71913\n", "[4000]\tvalidation_0-rmse:0.71651\n", "[6000]\tvalidation_0-rmse:0.71582\n", "[7940]\tvalidation_0-rmse:0.71567\n", "fold 1 validation error 0.7156685166732855\n", "fold 1 training error 0.705734118918996\n", "--------------------\n", "[0]\tvalidation_0-rmse:7.49703\n", "[2000]\tvalidation_0-rmse:0.71889\n", "[4000]\tvalidation_0-rmse:0.71651\n", "[6000]\tvalidation_0-rmse:0.71597\n", "[6932]\tvalidation_0-rmse:0.71591\n", "fold 2 validation error 0.7159020146190179\n", "fold 2 training error 0.7067970045167419\n", "--------------------\n", "[0]\tvalidation_0-rmse:7.49481\n", "[2000]\tvalidation_0-rmse:0.72070\n", "[4000]\tvalidation_0-rmse:0.71826\n", "[6000]\tvalidation_0-rmse:0.71770\n", "[6506]\tvalidation_0-rmse:0.71769\n", "fold 3 validation error 0.7176803581683315\n", "fold 3 training error 0.7068762736069921\n", "--------------------\n", "[0]\tvalidation_0-rmse:7.49703\n", "[2000]\tvalidation_0-rmse:0.72065\n", "[4000]\tvalidation_0-rmse:0.71818\n", "[6000]\tvalidation_0-rmse:0.71761\n", "[8000]\tvalidation_0-rmse:0.71746\n", "[8115]\tvalidation_0-rmse:0.71747\n", "fold 4 validation error 0.7174377111216177\n", "fold 4 training error 0.705044721965698\n", "--------------------\n", "[0]\tvalidation_0-rmse:7.50253\n", "[2000]\tvalidation_0-rmse:0.71927\n", "[4000]\tvalidation_0-rmse:0.71659\n", "[6000]\tvalidation_0-rmse:0.71593\n", "[8000]\tvalidation_0-rmse:0.71576\n", "[8145]\tvalidation_0-rmse:0.71576\n", "fold 5 validation error 0.7157431615630978\n", "fold 5 training error 0.7055256474596883\n", "--------------------\n" ] } ], "source": [ "model=XGBRegressor(**xgb_params)\n", "i=0\n", "sub=[]\n", "kf=KFold(n_splits=5,shuffle=True,random_state=42)\n", "for train_index,test_index in kf.split(train):\n", " i+=1\n", " xtrain=train.iloc[train_index]\n", " xvalid=train.iloc[test_index]\n", " \n", " df_test=test.copy()\n", " \n", " encoder=OrdinalEncoder()\n", " \n", " xtrain[object_col]=encoder.fit_transform(xtrain[object_col])\n", " xvalid[object_col]=encoder.transform(xvalid[object_col])\n", " df_test[object_col]=encoder.transform(df_test[object_col])\n", " \n", " model.fit(xtrain.drop('target',axis=1),xtrain['target'],\n", " early_stopping_rounds=300,\n", " eval_set=[(xvalid.drop('target',axis=1), xvalid['target'])], \n", " verbose=2000)\n", " \n", " pred_valid=model.predict(xvalid.drop('target',axis=1))\n", " pred_train=model.predict(xtrain.drop('target',axis=1))\n", " print(f'fold {i} validation error ',mean_squared_error(xvalid['target'],pred_valid,squared=False))\n", " print(f'fold {i} training error ',mean_squared_error(xtrain['target'],pred_train,squared=False))\n", " print(\"--------------------\")\n", " \n", " pred=model.predict(df_test)\n", " sub.append(pred)" ] }, { "cell_type": "code", "execution_count": 6, "id": "a2686091", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T19:17:59.731407Z", "iopub.status.busy": "2021-08-24T19:17:59.730490Z", "iopub.status.idle": "2021-08-24T19:17:59.740080Z", "shell.execute_reply": "2021-08-24T19:17:59.739531Z", "shell.execute_reply.started": "2021-08-22T03:56:22.872933Z" }, "papermill": { "duration": 0.033351, "end_time": "2021-08-24T19:17:59.740228", "exception": false, "start_time": "2021-08-24T19:17:59.706877", "status": "completed" }, "tags": [] }, "outputs": [], "source": [ "predictions=np.mean(np.column_stack(sub),axis=1)\n", "sample['target']=predictions" ] }, { "cell_type": "code", "execution_count": 7, "id": "c9849b54", "metadata": { "execution": { "iopub.execute_input": "2021-08-24T19:17:59.780142Z", "iopub.status.busy": "2021-08-24T19:17:59.779330Z", "iopub.status.idle": "2021-08-24T19:18:00.353462Z", "shell.execute_reply": "2021-08-24T19:18:00.352789Z", "shell.execute_reply.started": "2021-08-22T03:56:23.969056Z" }, "papermill": { "duration": 0.59623, "end_time": "2021-08-24T19:18:00.353604", "exception": false, "start_time": "2021-08-24T19:17:59.757374", "status": "completed" }, "tags": [] }, "outputs": [], "source": [ "sample.to_csv('sub17.csv',index=False)" ] }, { "cell_type": "code", "execution_count": null, "id": "e2444cbb", "metadata": { "papermill": { "duration": 0.016768, "end_time": "2021-08-24T19:18:00.387633", "exception": false, "start_time": "2021-08-24T19:18:00.370865", "status": "completed" }, "tags": [] }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.10" }, "papermill": { "default_parameters": {}, "duration": 2648.326511, "end_time": "2021-08-24T19:18:01.215693", "environment_variables": {}, "exception": null, "input_path": "__notebook__.ipynb", "output_path": "__notebook__.ipynb", "parameters": {}, "start_time": "2021-08-24T18:33:52.889182", "version": "2.3.3" } }, "nbformat": 4, "nbformat_minor": 5 }
0072/954/72954796.ipynb
s3://data-agents/kaggle-outputs/sharded/025_00072.jsonl.gz
"{\"metadata\":{\"kernelspec\":{\"language\":\"python\",\"display_name\":\"Python 3\",\"name\":\"pyt(...TRUNCATED)
0072/954/72954816.ipynb
s3://data-agents/kaggle-outputs/sharded/025_00072.jsonl.gz
"{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"id\": \"93462e(...TRUNCATED)
0072/954/72954919.ipynb
s3://data-agents/kaggle-outputs/sharded/025_00072.jsonl.gz
"{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"id\": \"53716c(...TRUNCATED)
0072/955/72955615.ipynb
s3://data-agents/kaggle-outputs/sharded/025_00072.jsonl.gz
"{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"id\": \"30d1d5(...TRUNCATED)
0072/955/72955804.ipynb
s3://data-agents/kaggle-outputs/sharded/025_00072.jsonl.gz
"{\n \"cells\": [\n {\n \"cell_type\": \"markdown\",\n \"id\": \"c711745b\",\n \"metadata\": (...TRUNCATED)
0072/957/72957076.ipynb
s3://data-agents/kaggle-outputs/sharded/025_00072.jsonl.gz
"{\n \"cells\": [\n {\n \"cell_type\": \"markdown\",\n \"id\": \"3c6fc1f4\",\n \"metadata\": (...TRUNCATED)
0072/957/72957491.ipynb
s3://data-agents/kaggle-outputs/sharded/025_00072.jsonl.gz
"{\"metadata\":{\"kernelspec\":{\"language\":\"python\",\"display_name\":\"Python 3\",\"name\":\"pyt(...TRUNCATED)
0072/957/72957630.ipynb
s3://data-agents/kaggle-outputs/sharded/025_00072.jsonl.gz
"{\n \"cells\": [\n {\n \"cell_type\": \"markdown\",\n \"id\": \"1221ca17\",\n \"metadata\": (...TRUNCATED)
0072/957/72957733.ipynb
s3://data-agents/kaggle-outputs/sharded/025_00072.jsonl.gz
README.md exists but content is empty.
Downloads last month
10