{"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-12T16:22:19.650137Z","iopub.execute_input":"2022-08-12T16:22:19.651261Z","iopub.status.idle":"2022-08-12T16:22:19.685699Z","shell.execute_reply.started":"2022-08-12T16:22:19.651135Z","shell.execute_reply":"2022-08-12T16:22:19.684543Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train = pd.read_csv(\"/kaggle/input/tabular-playground-series-aug-2022/train.csv\")\ntrain.head()","metadata":{"execution":{"iopub.status.busy":"2022-08-12T16:27:21.080481Z","iopub.execute_input":"2022-08-12T16:27:21.081532Z","iopub.status.idle":"2022-08-12T16:27:21.264072Z","shell.execute_reply.started":"2022-08-12T16:27:21.081468Z","shell.execute_reply":"2022-08-12T16:27:21.262764Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test = pd.read_csv(\"/kaggle/input/tabular-playground-series-aug-2022/test.csv\")\ntest.head()","metadata":{"execution":{"iopub.status.busy":"2022-08-12T16:31:08.907383Z","iopub.execute_input":"2022-08-12T16:31:08.907827Z","iopub.status.idle":"2022-08-12T16:31:09.052631Z","shell.execute_reply.started":"2022-08-12T16:31:08.907792Z","shell.execute_reply":"2022-08-12T16:31:09.051263Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train.shape","metadata":{"execution":{"iopub.status.busy":"2022-08-12T16:31:28.568363Z","iopub.execute_input":"2022-08-12T16:31:28.568779Z","iopub.status.idle":"2022-08-12T16:31:28.576204Z","shell.execute_reply.started":"2022-08-12T16:31:28.568746Z","shell.execute_reply":"2022-08-12T16:31:28.575070Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train.describe()","metadata":{"execution":{"iopub.status.busy":"2022-08-12T16:34:02.752110Z","iopub.execute_input":"2022-08-12T16:34:02.752531Z","iopub.status.idle":"2022-08-12T16:34:02.862482Z","shell.execute_reply.started":"2022-08-12T16:34:02.752476Z","shell.execute_reply":"2022-08-12T16:34:02.861265Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_col678 = train[['measurement_6','measurement_7','measurement_8']]\ntrain_col678.describe()","metadata":{"execution":{"iopub.status.busy":"2022-08-12T16:38:02.989350Z","iopub.execute_input":"2022-08-12T16:38:02.989786Z","iopub.status.idle":"2022-08-12T16:38:03.018227Z","shell.execute_reply.started":"2022-08-12T16:38:02.989752Z","shell.execute_reply":"2022-08-12T16:38:03.016988Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import seaborn as sns\nimport matplotlib.pyplot as plt\ncorrmat = train.corr()\ntop_corr_features = corrmat.index\nplt.figure(figsize=(30,30))\n#plot heat map\ng=sns.heatmap(train[top_corr_features].corr(),annot=True,cmap=\"RdYlGn\")","metadata":{"execution":{"iopub.status.busy":"2022-08-12T16:44:14.595084Z","iopub.execute_input":"2022-08-12T16:44:14.596322Z","iopub.status.idle":"2022-08-12T16:44:18.338649Z","shell.execute_reply.started":"2022-08-12T16:44:14.596270Z","shell.execute_reply":"2022-08-12T16:44:18.337567Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import matplotlib.pyplot as plt\n\nplt.scatter(train['loading'], train['measurement_17'], c=train['failure'],marker='*')\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-08-12T17:07:03.666609Z","iopub.execute_input":"2022-08-12T17:07:03.667464Z","iopub.status.idle":"2022-08-12T17:07:04.126795Z","shell.execute_reply.started":"2022-08-12T17:07:03.667415Z","shell.execute_reply":"2022-08-12T17:07:04.125566Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import matplotlib.pyplot as plt\n\nplt.scatter(train['measurement_0'], train['measurement_9'], c=train['failure'],marker='*')\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-08-12T17:11:14.080753Z","iopub.execute_input":"2022-08-12T17:11:14.081552Z","iopub.status.idle":"2022-08-12T17:11:14.499647Z","shell.execute_reply.started":"2022-08-12T17:11:14.081477Z","shell.execute_reply":"2022-08-12T17:11:14.498290Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df = train[train['failure']==0]\ndf.shape","metadata":{"execution":{"iopub.status.busy":"2022-08-12T17:16:32.929769Z","iopub.execute_input":"2022-08-12T17:16:32.930425Z","iopub.status.idle":"2022-08-12T17:16:32.945942Z","shell.execute_reply.started":"2022-08-12T17:16:32.930386Z","shell.execute_reply":"2022-08-12T17:16:32.944400Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.scatter(df['attribute_2'], df['attribute_3'], c=df['failure'],marker='*')\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-08-12T17:16:36.415710Z","iopub.execute_input":"2022-08-12T17:16:36.416100Z","iopub.status.idle":"2022-08-12T17:16:36.798372Z","shell.execute_reply.started":"2022-08-12T17:16:36.416071Z","shell.execute_reply":"2022-08-12T17:16:36.797534Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.scatter(train['attribute_2'], train['attribute_3'], c=train['failure'],marker='*')\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-08-12T17:17:25.965621Z","iopub.execute_input":"2022-08-12T17:17:25.966013Z","iopub.status.idle":"2022-08-12T17:17:26.402997Z","shell.execute_reply.started":"2022-08-12T17:17:25.965983Z","shell.execute_reply":"2022-08-12T17:17:26.401924Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.scatter(train['attribute_2'], train['measurement_9'], c=train['failure'],marker='*')\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-08-12T17:20:09.136080Z","iopub.execute_input":"2022-08-12T17:20:09.137170Z","iopub.status.idle":"2022-08-12T17:20:09.576370Z","shell.execute_reply.started":"2022-08-12T17:20:09.137128Z","shell.execute_reply":"2022-08-12T17:20:09.575540Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":" **Work in progress,will update soon!! If you like my notebook please upvote. Also any feedbacks/queries are most welcome on comment section. Thank you**","metadata":{}},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}