{"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":"markdown","source":"**Analysis of the submission samples for the [SIIM COVID-19 Detection](https://www.kaggle.com/c/siim-covid19-detection/overview) competition**.\n\n**Conclusions**:\n- The submission must include both image and study labels in the same file.\n- The first two fields are related to studies (label, confidence), the next four fields to images (box dimensions).","metadata":{}},{"cell_type":"markdown","source":"# CONFS","metadata":{}},{"cell_type":"code","source":"SAMPLES = '/kaggle/input/siim-covid19-detection/sample_submission.csv'","metadata":{"execution":{"iopub.status.busy":"2021-06-23T12:19:34.780181Z","iopub.execute_input":"2021-06-23T12:19:34.780561Z","iopub.status.idle":"2021-06-23T12:19:34.785471Z","shell.execute_reply.started":"2021-06-23T12:19:34.78053Z","shell.execute_reply":"2021-06-23T12:19:34.784076Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# IMPORTS","metadata":{}},{"cell_type":"code","source":"import pandas as pd","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2021-06-23T12:19:35.530074Z","iopub.execute_input":"2021-06-23T12:19:35.530471Z","iopub.status.idle":"2021-06-23T12:19:35.537329Z","shell.execute_reply.started":"2021-06-23T12:19:35.530439Z","shell.execute_reply":"2021-06-23T12:19:35.536331Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# DATASETS","metadata":{}},{"cell_type":"code","source":"df = pd.read_csv(SAMPLES, index_col='id')\n# assert df['id'].nunique() == len(df)\ndf.head()","metadata":{"execution":{"iopub.status.busy":"2021-06-23T13:01:16.272156Z","iopub.execute_input":"2021-06-23T13:01:16.272666Z","iopub.status.idle":"2021-06-23T13:01:16.298297Z","shell.execute_reply.started":"2021-06-23T13:01:16.272624Z","shell.execute_reply":"2021-06-23T13:01:16.297197Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# ANALYSIS","metadata":{}},{"cell_type":"markdown","source":"- There are 2,477 entries in total.\n- There are no null values in the data.\n- There is a single column: PredictionString","metadata":{}},{"cell_type":"code","source":"df.info()","metadata":{"execution":{"iopub.status.busy":"2021-06-23T13:01:31.517767Z","iopub.execute_input":"2021-06-23T13:01:31.518544Z","iopub.status.idle":"2021-06-23T13:01:31.532738Z","shell.execute_reply.started":"2021-06-23T13:01:31.518481Z","shell.execute_reply":"2021-06-23T13:01:31.53096Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"- There are two types of predictions:\n    - **Study Level**:\n        - The format for a given label's prediction would be:\n            - a class ID\n            - a confidence score\n            - 0 0 1 1 is a one-pixel bounding box\n        - Studies in the test set may contain more than one label.\n        - Possible values: \"negative\", \"typical\", \"indeterminate\", \"atypical\".\n        - For each study in the test set, you should predict at least one of the above labels.\n    - **Image Level**:\n        - Images in the test set may contain more than one object.\n        - For each object in a given test image, you must predict:\n            - a class ID of \"opacity\"\n            - a confidence score\n            - a bounding box (xmin ymin xmax ymax).\n        - If you predict that there are NO objects in a given image, you should `predict none 1.0 0 0 1 1`.\n            - where none is the class ID for \"No finding\", 1.0 is the confidence, and 0 0 1 1 is a one-pixel bounding box.\n    \nSource: https://www.kaggle.com/c/siim-covid19-detection/overview/evaluation","metadata":{}},{"cell_type":"code","source":"df['PredictionString'].unique()","metadata":{"execution":{"iopub.status.busy":"2021-06-23T13:01:32.882675Z","iopub.execute_input":"2021-06-23T13:01:32.883025Z","iopub.status.idle":"2021-06-23T13:01:32.89152Z","shell.execute_reply.started":"2021-06-23T13:01:32.882995Z","shell.execute_reply":"2021-06-23T13:01:32.889926Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# EXAMPLES","metadata":{}},{"cell_type":"markdown","source":"```csv\nId,PredictionString\n2b95d54e4be65_study,negative 1 0 0 1 1\n2b95d54e4be66_study,typical 1 0 0 1 1\n2b95d54e4be67_study,indeterminate 1 0 0 1 1 atypical 1 0 0 1 1\n2b95d54e4be68_image,none 1 0 0 1 1\n2b95d54e4be69_image,opacity 0.5 100 100 200 200 opacity 0.7 10 10 20 20\n```\nSource: https://www.kaggle.com/c/siim-covid19-detection/overview/evaluation","metadata":{}}]}