{"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":"# AI 5 Assignment - Dog Breed EDA Sheet\n\n# Name: Furqaan Thakur\n# Email: thakurfurqaan@gmail.com","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Loading the labels file for performing EDA\n\nimport pandas as pd\n\nlabels_filepath = \"../input/dog-breed-identification/labels.csv\"\nlabels_df = pd.read_csv(labels_filepath)\n\nlabels_df.head()","metadata":{"execution":{"iopub.status.busy":"2022-05-16T10:29:59.270804Z","iopub.execute_input":"2022-05-16T10:29:59.271148Z","iopub.status.idle":"2022-05-16T10:29:59.304794Z","shell.execute_reply.started":"2022-05-16T10:29:59.271112Z","shell.execute_reply":"2022-05-16T10:29:59.304160Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"labels_df.describe()","metadata":{"execution":{"iopub.status.busy":"2022-05-16T10:32:41.025199Z","iopub.execute_input":"2022-05-16T10:32:41.025490Z","iopub.status.idle":"2022-05-16T10:32:41.049573Z","shell.execute_reply.started":"2022-05-16T10:32:41.025462Z","shell.execute_reply":"2022-05-16T10:32:41.048939Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Observations\n\n'''\nTotal No. of samples: 10,222\nUnique dog breeds found: 120\nThere are no null values.\n'''","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Checking Class Balancing\n\nprint(\"Maximum samples for a breed: \", labels_df.breed.value_counts().max())\nprint(\"Minimum samples for a breed: \", labels_df.breed.value_counts().min())","metadata":{"execution":{"iopub.status.busy":"2022-05-16T10:50:44.351524Z","iopub.execute_input":"2022-05-16T10:50:44.352043Z","iopub.status.idle":"2022-05-16T10:50:44.362205Z","shell.execute_reply.started":"2022-05-16T10:50:44.351989Z","shell.execute_reply":"2022-05-16T10:50:44.361029Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"labels_df.breed.value_counts().plot.bar(figsize=(25,12))\n\n'''\nAs it could be observed in the bar plot below, \nthere is a slight imbalance in the number of samples available for each class.\nIt is not a significant number, the dataset looks good for further training and processing.\n'''","metadata":{"execution":{"iopub.status.busy":"2022-05-16T10:52:20.971612Z","iopub.execute_input":"2022-05-16T10:52:20.972176Z","iopub.status.idle":"2022-05-16T10:52:22.673905Z","shell.execute_reply.started":"2022-05-16T10:52:20.972136Z","shell.execute_reply":"2022-05-16T10:52:22.673314Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Checking a sample image\n\nfrom IPython.display import display, Image\nImage(\"../input/dog-breed-identification/train/002211c81b498ef88e1b40b9abf84e1d.jpg\")","metadata":{"execution":{"iopub.status.busy":"2022-05-16T11:04:24.706166Z","iopub.execute_input":"2022-05-16T11:04:24.706961Z","iopub.status.idle":"2022-05-16T11:04:24.716139Z","shell.execute_reply.started":"2022-05-16T11:04:24.706925Z","shell.execute_reply":"2022-05-16T11:04:24.715288Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"'''\nObservations:\nThe images consist of RGB colors and they might not be closely fitted or cropped\nto the dog.\nThe background may contain water, humans, trees, etc\n'''","metadata":{},"execution_count":null,"outputs":[]}]}