{"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":"2023-04-18T07:08:26.942293Z","iopub.execute_input":"2023-04-18T07:08:26.942723Z","iopub.status.idle":"2023-04-18T07:08:26.951000Z","shell.execute_reply.started":"2023-04-18T07:08:26.942688Z","shell.execute_reply":"2023-04-18T07:08:26.949855Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n%matplotlib inline\nfrom sklearn.model_selection import train_test_split\n\nimport tensorflow as tf","metadata":{"execution":{"iopub.status.busy":"2023-04-18T07:08:26.953089Z","iopub.execute_input":"2023-04-18T07:08:26.953493Z","iopub.status.idle":"2023-04-18T07:08:33.631081Z","shell.execute_reply.started":"2023-04-18T07:08:26.953451Z","shell.execute_reply":"2023-04-18T07:08:33.629886Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train=pd.read_csv('../input/Kannada-MNIST/train.csv')\ntest=pd.read_csv('../input/Kannada-MNIST/test.csv')\nsample_sub=pd.read_csv('../input/Kannada-MNIST/sample_submission.csv')","metadata":{"execution":{"iopub.status.busy":"2023-04-18T07:08:33.632825Z","iopub.execute_input":"2023-04-18T07:08:33.633637Z","iopub.status.idle":"2023-04-18T07:08:39.354097Z","shell.execute_reply.started":"2023-04-18T07:08:33.633590Z","shell.execute_reply":"2023-04-18T07:08:39.352998Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"print(\"Train Data\")\nprint(train.head(3))\nprint(\"Test Data\")\nprint(test.head(3))","metadata":{"execution":{"iopub.status.busy":"2023-04-18T07:08:39.356832Z","iopub.execute_input":"2023-04-18T07:08:39.357290Z","iopub.status.idle":"2023-04-18T07:08:39.383385Z","shell.execute_reply.started":"2023-04-18T07:08:39.357257Z","shell.execute_reply":"2023-04-18T07:08:39.382195Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"''' Checking for null and missing values'''\nprint(\"Train Data\")\nprint(train.isnull().any().describe())\nprint(\"Test Data\")\nprint(train.isnull().any().describe())","metadata":{"execution":{"iopub.status.busy":"2023-04-18T07:08:39.384932Z","iopub.execute_input":"2023-04-18T07:08:39.385297Z","iopub.status.idle":"2023-04-18T07:08:39.428362Z","shell.execute_reply.started":"2023-04-18T07:08:39.385267Z","shell.execute_reply":"2023-04-18T07:08:39.427056Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"y_train=train['label']\nX_train=train.drop('label',axis=1)\nX_test=test.drop('id',axis=1)","metadata":{"execution":{"iopub.status.busy":"2023-04-18T07:08:39.429920Z","iopub.execute_input":"2023-04-18T07:08:39.431113Z","iopub.status.idle":"2023-04-18T07:08:39.598967Z","shell.execute_reply.started":"2023-04-18T07:08:39.431071Z","shell.execute_reply":"2023-04-18T07:08:39.597368Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"print('Input matrix dimension:', X_train.shape)\nprint('output vector dimension:', y_train.shape)\nprint('Test data dimension:', X_test.shape)\n","metadata":{"execution":{"iopub.status.busy":"2023-04-18T07:08:39.600400Z","iopub.execute_input":"2023-04-18T07:08:39.600854Z","iopub.status.idle":"2023-04-18T07:08:39.606619Z","shell.execute_reply.started":"2023-04-18T07:08:39.600817Z","shell.execute_reply":"2023-04-18T07:08:39.605752Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"'''visualizationa and distribution'''\nplt.figure(figsize = (0,0))\n","metadata":{"execution":{"iopub.status.busy":"2023-04-18T07:09:21.824811Z","iopub.execute_input":"2023-04-18T07:09:21.825225Z","iopub.status.idle":"2023-04-18T07:09:22.004699Z","shell.execute_reply.started":"2023-04-18T07:09:21.825191Z","shell.execute_reply":"2023-04-18T07:09:22.002773Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}