{"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":"2021-11-20T00:22:52.679823Z","iopub.execute_input":"2021-11-20T00:22:52.680327Z","iopub.status.idle":"2021-11-20T00:22:54.642599Z","shell.execute_reply.started":"2021-11-20T00:22:52.680216Z","shell.execute_reply":"2021-11-20T00:22:54.641879Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# lets see how the predictions need to look\ndfd = pd.read_csv(r'/kaggle/input/sartorius-cell-instance-segmentation/sample_submission.csv')\ndfd.head()","metadata":{"execution":{"iopub.status.busy":"2021-11-20T00:27:22.901942Z","iopub.execute_input":"2021-11-20T00:27:22.902426Z","iopub.status.idle":"2021-11-20T00:27:22.917000Z","shell.execute_reply.started":"2021-11-20T00:27:22.902382Z","shell.execute_reply":"2021-11-20T00:27:22.916191Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Lets Load the file and start the introduction","metadata":{}},{"cell_type":"code","source":"df = pd.read_csv(r'/kaggle/input/sartorius-cell-instance-segmentation/train.csv')","metadata":{"execution":{"iopub.status.busy":"2021-11-20T00:22:54.644635Z","iopub.execute_input":"2021-11-20T00:22:54.644963Z","iopub.status.idle":"2021-11-20T00:22:55.251012Z","shell.execute_reply.started":"2021-11-20T00:22:54.644920Z","shell.execute_reply":"2021-11-20T00:22:55.250306Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.head()","metadata":{"execution":{"iopub.status.busy":"2021-11-20T00:22:55.252442Z","iopub.execute_input":"2021-11-20T00:22:55.252952Z","iopub.status.idle":"2021-11-20T00:22:55.284487Z","shell.execute_reply.started":"2021-11-20T00:22:55.252908Z","shell.execute_reply":"2021-11-20T00:22:55.283489Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"We can see that over here we can see different types of cells, each with its own bio specifications \n\n# Thus we need to figure out how unique variants of cells can relate to alzheimers ","metadata":{}},{"cell_type":"code","source":"# Plotting correlations amongst features\ndf.corr().plot()","metadata":{"execution":{"iopub.status.busy":"2021-11-20T00:27:56.313282Z","iopub.execute_input":"2021-11-20T00:27:56.313923Z","iopub.status.idle":"2021-11-20T00:27:56.582161Z","shell.execute_reply.started":"2021-11-20T00:27:56.313886Z","shell.execute_reply":"2021-11-20T00:27:56.581277Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Seems simple algorithms cannot detect any relationships","metadata":{}},{"cell_type":"code","source":"# lets group by cell_type and plate_time to see how it relates\nnew_r = df.groupby(['cell_type','plate_time'])\nnew_r.head()","metadata":{"execution":{"iopub.status.busy":"2021-11-20T00:31:31.779362Z","iopub.execute_input":"2021-11-20T00:31:31.779635Z","iopub.status.idle":"2021-11-20T00:31:31.819239Z","shell.execute_reply.started":"2021-11-20T00:31:31.779605Z","shell.execute_reply":"2021-11-20T00:31:31.818349Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# We now can Notice that certain Cell types have certain plate_time durations as well such as astro has a plat_time of 13 hours","metadata":{}},{"cell_type":"code","source":"# lets visualize cell type clusters against plate_time\nfrom matplotlib import pyplot as plt\nplt.scatter(df.cell_type, df.plate_time, alpha = 0.6)","metadata":{"execution":{"iopub.status.busy":"2021-11-20T00:37:25.799070Z","iopub.execute_input":"2021-11-20T00:37:25.799366Z","iopub.status.idle":"2021-11-20T00:37:26.283074Z","shell.execute_reply.started":"2021-11-20T00:37:25.799329Z","shell.execute_reply":"2021-11-20T00:37:26.282345Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# We can here see that all cell types have certain uniue plat_time identifiers","metadata":{}},{"cell_type":"code","source":"# lets make a prediction for cell","metadata":{"execution":{"iopub.status.busy":"2021-11-20T00:40:52.886691Z","iopub.execute_input":"2021-11-20T00:40:52.886972Z","iopub.status.idle":"2021-11-20T00:40:52.953154Z","shell.execute_reply.started":"2021-11-20T00:40:52.886942Z","shell.execute_reply":"2021-11-20T00:40:52.952083Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}