{"cells": [{"outputs": [], "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 in \n", "\n", "import numpy as np # linear algebra\n", "import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n", "from keras.models import Sequential\n", "from keras.layers import Dense , Conv2D , Dropout , Flatten\n", "# Input data files are available in the \"../input/\" directory.\n", "# For example, running this (by clicking run or pressing Shift+Enter) will list the files in the input directory\n", "\n", "from subprocess import check_output\n", "print(check_output([\"ls\", \"../input\"]).decode(\"utf8\"))\n", "\n", "# Any results you write to the current directory are saved as output."], "cell_type": "code", "metadata": {"_uuid": "9c3a52db2c0528b74b8eb4341c203aa9577df772", "_cell_guid": "06f4e94f-a225-4372-9d47-9ca49ab416c4"}, "execution_count": 2}, {"outputs": [], "source": ["train = pd.read_csv(\"../input/labels.csv\")\n", "test = pd.read_csv(\"../input/sample_submission.csv\")"], "cell_type": "code", "metadata": {"collapsed": true}, "execution_count": 3}, {"outputs": [], "source": ["train.head()"], "cell_type": "code", "metadata": {}, "execution_count": 4}, {"outputs": [], "source": ["train_label = pd.Series(train['breed'])"], "cell_type": "code", "metadata": {}, "execution_count": 8}, {"outputs": [], "source": ["classes, counts = np.unique(train_label, return_counts=True)\n", "print(\"Some classes with count:\")\n", "print(np.asarray((classes, counts)))\n", "print(\"Number of class: %d\" % classes.size)"], "cell_type": "code", "metadata": {}, "execution_count": 17}, {"outputs": [], "source": ["import seaborn as sns\n", "from matplotlib import pyplot as plt"], "cell_type": "code", "metadata": {}, "execution_count": 21}, {"outputs": [], "source": ["#plt.barh(classes[:10] , counts[:10])\n", "plt.barh(classes[:10],counts[:10])"], "cell_type": "code", "metadata": {}, "execution_count": 28}, {"outputs": [], "source": ["plt.barh(classes[-10:],counts[-10:])"], "cell_type": "code", "metadata": {}, "execution_count": 32}, {"outputs": [], "source": [], "cell_type": "code", "metadata": {}, "execution_count": 34}, {"outputs": [], "source": [], "cell_type": "code", "metadata": {"collapsed": true}, "execution_count": null}], "nbformat": 4, "metadata": {"language_info": {"nbconvert_exporter": "python", "pygments_lexer": "ipython3", "name": "python", "file_extension": ".py", "mimetype": "text/x-python", "version": "3.6.3", "codemirror_mode": {"version": 3, "name": "ipython"}}, "kernelspec": {"display_name": "Python 3", "name": "python3", "language": "python"}}, "nbformat_minor": 1}