{"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":"Motivated from Crish idea how to probing public LB - https://www.kaggle.com/cdeotte/lb-probing-strategies-0-890-2nd-place","metadata":{}},{"cell_type":"code","source":"import json\nimport pandas as pd\nscored_birds = json.load(open('../input/birdclef-2022/scored_birds.json','r'))\ntest = pd.read_csv('../input/birdclef-2022/test.csv')\nsubmission = pd.read_csv('../input/birdclef-2022/sample_submission.csv')","metadata":{"execution":{"iopub.status.busy":"2022-02-16T16:39:48.447128Z","iopub.execute_input":"2022-02-16T16:39:48.447574Z","iopub.status.idle":"2022-02-16T16:39:48.461428Z","shell.execute_reply.started":"2022-02-16T16:39:48.447521Z","shell.execute_reply":"2022-02-16T16:39:48.460803Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"len(scored_birds), scored_birds","metadata":{"execution":{"iopub.status.busy":"2022-02-16T16:39:48.463858Z","iopub.execute_input":"2022-02-16T16:39:48.464535Z","iopub.status.idle":"2022-02-16T16:39:48.474988Z","shell.execute_reply.started":"2022-02-16T16:39:48.464479Z","shell.execute_reply":"2022-02-16T16:39:48.473962Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test","metadata":{"execution":{"iopub.status.busy":"2022-02-16T16:39:48.476864Z","iopub.execute_input":"2022-02-16T16:39:48.477494Z","iopub.status.idle":"2022-02-16T16:39:48.492159Z","shell.execute_reply.started":"2022-02-16T16:39:48.477445Z","shell.execute_reply":"2022-02-16T16:39:48.491242Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"**test.csv** - Metadata for the test set. Only the first three rows are available for download; the full test.csv is provided in the hidden test set.\n\n* row_id - A unique identifier for the row.\n*  file_id - A unique identifier for the audio file.\n* bird - **The ebird code for the row. There is one row for each of the scored species per 5 second window per audio file.**\n* end_time - The last second of the 5 second time window (5, 10, 15, etc).","metadata":{}},{"cell_type":"markdown","source":"# Total 21 birds to be detected","metadata":{}},{"cell_type":"code","source":"submission","metadata":{"execution":{"iopub.status.busy":"2022-02-16T16:39:48.493462Z","iopub.execute_input":"2022-02-16T16:39:48.494232Z","iopub.status.idle":"2022-02-16T16:39:48.502840Z","shell.execute_reply.started":"2022-02-16T16:39:48.494177Z","shell.execute_reply":"2022-02-16T16:39:48.502085Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"scored_birds.index('skylar')","metadata":{"execution":{"iopub.status.busy":"2022-02-16T16:39:48.505088Z","iopub.execute_input":"2022-02-16T16:39:48.505330Z","iopub.status.idle":"2022-02-16T16:39:48.515589Z","shell.execute_reply.started":"2022-02-16T16:39:48.505291Z","shell.execute_reply":"2022-02-16T16:39:48.514679Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"bird_index = 18\nsubmission['target'] = False\nsubmission['target'] = test.bird == scored_birds[bird_index]","metadata":{"execution":{"iopub.status.busy":"2022-02-16T16:39:48.516868Z","iopub.execute_input":"2022-02-16T16:39:48.517288Z","iopub.status.idle":"2022-02-16T16:39:48.525687Z","shell.execute_reply.started":"2022-02-16T16:39:48.517240Z","shell.execute_reply":"2022-02-16T16:39:48.524915Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"submission","metadata":{"execution":{"iopub.status.busy":"2022-02-16T16:39:48.526923Z","iopub.execute_input":"2022-02-16T16:39:48.527333Z","iopub.status.idle":"2022-02-16T16:39:48.539920Z","shell.execute_reply.started":"2022-02-16T16:39:48.527285Z","shell.execute_reply":"2022-02-16T16:39:48.539226Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"submission.to_csv('submission.csv',index=False)","metadata":{"execution":{"iopub.status.busy":"2022-02-16T16:39:48.541324Z","iopub.execute_input":"2022-02-16T16:39:48.542172Z","iopub.status.idle":"2022-02-16T16:39:48.546533Z","shell.execute_reply.started":"2022-02-16T16:39:48.542140Z","shell.execute_reply":"2022-02-16T16:39:48.545926Z"},"trusted":true},"execution_count":null,"outputs":[]}]}