{"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)\n\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":"2022-08-11T12:20:30.229150Z","iopub.execute_input":"2022-08-11T12:20:30.229573Z","iopub.status.idle":"2022-08-11T12:20:30.239871Z","shell.execute_reply.started":"2022-08-11T12:20:30.229539Z","shell.execute_reply":"2022-08-11T12:20:30.238649Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import pandas as pd\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n%matplotlib inline\nimport matplotlib.pyplot as plt  # Matlab-style plotting\nimport seaborn as sns\ncolor = sns.color_palette()\nsns.set_style('darkgrid')\nsubmission = pd.read_csv('/kaggle/input/tabular-playground-series-jul-2021/sample_submission.csv')\ntrain = pd.read_csv('/kaggle/input/tabular-playground-series-jul-2021/train.csv',\n                    parse_dates=['date_time'], infer_datetime_format=True)\ntest = pd.read_csv('/kaggle/input/tabular-playground-series-jul-2021/test.csv',\n                    parse_dates=['date_time'], infer_datetime_format=True)\ntrain['hour'] = train['date_time'].dt.hour\ntest['hour'] = test['date_time'].dt.hour\ntrain['dayofweek'] = train['date_time'].dt.dayofweek\ntest['dayofweek'] = test['date_time'].dt.dayofweek\ntrain.info()","metadata":{"execution":{"iopub.status.busy":"2022-08-11T12:20:30.287881Z","iopub.execute_input":"2022-08-11T12:20:30.288914Z","iopub.status.idle":"2022-08-11T12:20:30.351141Z","shell.execute_reply.started":"2022-08-11T12:20:30.288873Z","shell.execute_reply":"2022-08-11T12:20:30.350257Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train=train[train['sensor_2']<500]","metadata":{"execution":{"iopub.status.busy":"2022-08-11T12:20:30.352797Z","iopub.execute_input":"2022-08-11T12:20:30.353340Z","iopub.status.idle":"2022-08-11T12:20:30.361752Z","shell.execute_reply.started":"2022-08-11T12:20:30.353306Z","shell.execute_reply":"2022-08-11T12:20:30.360483Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.distplot(train['target_benzene']);","metadata":{"execution":{"iopub.status.busy":"2022-08-11T12:20:30.363099Z","iopub.execute_input":"2022-08-11T12:20:30.363662Z","iopub.status.idle":"2022-08-11T12:20:30.687692Z","shell.execute_reply.started":"2022-08-11T12:20:30.363628Z","shell.execute_reply":"2022-08-11T12:20:30.686412Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fig, ax = plt.subplots()\nax.scatter(x = train['sensor_1'], y = train['target_benzene'])\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-08-11T12:20:30.691226Z","iopub.execute_input":"2022-08-11T12:20:30.691687Z","iopub.status.idle":"2022-08-11T12:20:30.968972Z","shell.execute_reply.started":"2022-08-11T12:20:30.691647Z","shell.execute_reply":"2022-08-11T12:20:30.967527Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fig, ax = plt.subplots()\nax.scatter(x = train['sensor_2'], y = train['target_benzene'])\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-08-11T12:20:30.970619Z","iopub.execute_input":"2022-08-11T12:20:30.971255Z","iopub.status.idle":"2022-08-11T12:20:31.245580Z","shell.execute_reply.started":"2022-08-11T12:20:30.971206Z","shell.execute_reply":"2022-08-11T12:20:31.244707Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fig, ax = plt.subplots()\nax.scatter(x = train['sensor_3'], y = train['target_benzene'])\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-08-11T12:20:31.246894Z","iopub.execute_input":"2022-08-11T12:20:31.247773Z","iopub.status.idle":"2022-08-11T12:20:31.523834Z","shell.execute_reply.started":"2022-08-11T12:20:31.247724Z","shell.execute_reply":"2022-08-11T12:20:31.522672Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fig, ax = plt.subplots()\nax.scatter(x = train['sensor_4'], y = train['target_benzene'])\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-08-11T12:20:31.525423Z","iopub.execute_input":"2022-08-11T12:20:31.526563Z","iopub.status.idle":"2022-08-11T12:20:31.774042Z","shell.execute_reply.started":"2022-08-11T12:20:31.526514Z","shell.execute_reply":"2022-08-11T12:20:31.772528Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fig, ax = plt.subplots()\nax.scatter(x = train['sensor_5'], y = train['target_benzene'])\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-08-11T12:20:31.775497Z","iopub.execute_input":"2022-08-11T12:20:31.775844Z","iopub.status.idle":"2022-08-11T12:20:32.032525Z","shell.execute_reply.started":"2022-08-11T12:20:31.775814Z","shell.execute_reply":"2022-08-11T12:20:32.031174Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fig, ax = plt.subplots()\nax.scatter(x = train['deg_C'], y = train['target_benzene'])\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-08-11T12:20:32.033856Z","iopub.execute_input":"2022-08-11T12:20:32.034317Z","iopub.status.idle":"2022-08-11T12:20:32.277411Z","shell.execute_reply.started":"2022-08-11T12:20:32.034282Z","shell.execute_reply":"2022-08-11T12:20:32.276244Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fig, ax = plt.subplots()\nax.scatter(x = train['relative_humidity'], y = train['target_benzene'])\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-08-11T12:20:32.280451Z","iopub.execute_input":"2022-08-11T12:20:32.280787Z","iopub.status.idle":"2022-08-11T12:20:32.530668Z","shell.execute_reply.started":"2022-08-11T12:20:32.280757Z","shell.execute_reply":"2022-08-11T12:20:32.529533Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fig, ax = plt.subplots()\nax.scatter(x = train['absolute_humidity'], y = train['target_benzene'])\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-08-11T12:20:32.533404Z","iopub.execute_input":"2022-08-11T12:20:32.533752Z","iopub.status.idle":"2022-08-11T12:20:32.791430Z","shell.execute_reply.started":"2022-08-11T12:20:32.533721Z","shell.execute_reply":"2022-08-11T12:20:32.790197Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.countplot(x='hour',data=train)","metadata":{"execution":{"iopub.status.busy":"2022-08-11T12:20:32.793113Z","iopub.execute_input":"2022-08-11T12:20:32.793489Z","iopub.status.idle":"2022-08-11T12:20:33.164898Z","shell.execute_reply.started":"2022-08-11T12:20:32.793454Z","shell.execute_reply":"2022-08-11T12:20:33.163965Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.countplot(x='dayofweek',data=train)","metadata":{"execution":{"iopub.status.busy":"2022-08-11T12:20:33.166418Z","iopub.execute_input":"2022-08-11T12:20:33.167043Z","iopub.status.idle":"2022-08-11T12:20:33.403868Z","shell.execute_reply.started":"2022-08-11T12:20:33.167008Z","shell.execute_reply":"2022-08-11T12:20:33.403029Z"},"trusted":true},"execution_count":null,"outputs":[]}]}