{"cells":[{"metadata":{},"cell_type":"markdown","source":"# Test data info\n\n## Submission File\nFor each image ID in the test set, you must classify the grapheme root, vowel diacritic, and consonant diacritic for all images. The prediction for each component goes on a separate row. The submission file should contain a header and have the following format:\n\nhttps://www.kaggle.com/c/bengaliai-cv19/overview/evaluation\n"},{"metadata":{},"cell_type":"markdown","source":"Test data files."},{"metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true},"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 in \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 \"../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 sorted(filenames):\n        if filename.startswith(\"test_image_data\") or filename.startswith(\"sample_submission\"):\n            fullpath = os.path.join(dirname, filename)\n            print('{}:{} MB'.format(fullpath, round(os.path.getsize(fullpath) / (1024.0 ** 2), 4)))\n\n# Any results you write to the current directory are saved as output.","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"# Submission data"},{"metadata":{"_uuid":"d629ff2d2480ee46fbb7e2d37f6b5fab8052498a","_cell_guid":"79c7e3d0-c299-4dcb-8224-4455121ee9b0","trusted":true},"cell_type":"code","source":"submission_data = pd.read_csv(\"/kaggle/input/bengaliai-cv19/sample_submission.csv\")\nsubmission_data","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"# Test image data."},{"metadata":{"trusted":true},"cell_type":"code","source":"files = [\n    \"test_image_data_0.parquet\",\n    \"test_image_data_1.parquet\",\n    \"test_image_data_2.parquet\",\n    \"test_image_data_3.parquet\",\n]\n\n\ntest_image_data_set = []\nfor file in files:\n    test_image_data_set.append(pd.read_parquet('/kaggle/input/bengaliai-cv19/{}'.format(file)))\n","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"test_image_data_set[0].head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"test_image_data_set[1].head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"test_image_data_set[2].head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"test_image_data_set[3].head()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"# Create image data\n\none line is one file."},{"metadata":{"trusted":true},"cell_type":"code","source":"IMAGE_ROW = 137 \nIMAGE_COLUMN = 236\n\nfrom matplotlib import pylab as plt\n\nimage_set = []\nindex = -1\nrow_count = len(test_image_data_set)\nplt.figure(figsize=(15,10))\n\nfor test_image_data in test_image_data_set:\n\n    index = index + 1\n    drop_data = test_image_data.drop('image_id', axis=1)\n    column_count = len(test_image_data_set)\n    \n    for row, item in drop_data.iterrows():\n    \n        image = item.values.reshape([IMAGE_ROW, IMAGE_COLUMN])\n        no = index * column_count + row + 1\n        plt.subplot(row_count, column_count, no)\n        plt.imshow(image)\n","execution_count":null,"outputs":[]}],"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":4,"nbformat_minor":1}