{"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":"# Kaggle AI Report","metadata":{}},{"cell_type":"code","source":"import matplotlib.pyplot as plt\nimport numpy as np\nimport os\nimport pandas as pd\nimport seaborn as sns\nimport torch","metadata":{"execution":{"iopub.status.busy":"2023-06-26T17:42:07.033032Z","iopub.execute_input":"2023-06-26T17:42:07.033425Z","iopub.status.idle":"2023-06-26T17:42:11.340107Z","shell.execute_reply.started":"2023-06-26T17:42:07.033387Z","shell.execute_reply":"2023-06-26T17:42:11.339175Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"writeups_df = pd.read_csv(\"../input/2023-kaggle-ai-report/kaggle_writeups_20230510.csv\")\nsample_submission_df = pd.read_csv(\"../input/2023-kaggle-ai-report/sample_submission.csv\")","metadata":{"execution":{"iopub.status.busy":"2023-06-26T17:42:11.341706Z","iopub.execute_input":"2023-06-26T17:42:11.343086Z","iopub.status.idle":"2023-06-26T17:42:11.737853Z","shell.execute_reply.started":"2023-06-26T17:42:11.343050Z","shell.execute_reply":"2023-06-26T17:42:11.736732Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"writeups_df.head()","metadata":{"execution":{"iopub.status.busy":"2023-06-26T17:42:11.739272Z","iopub.execute_input":"2023-06-26T17:42:11.740309Z","iopub.status.idle":"2023-06-26T17:42:11.779788Z","shell.execute_reply.started":"2023-06-26T17:42:11.740266Z","shell.execute_reply":"2023-06-26T17:42:11.778672Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"competition_launch_years = writeups_df[\"Competition Launch Date\"].apply(lambda x: int(x[6:11]))\nsns.histplot(competition_launch_years)\nplt.xlabel(\"Competition Launch Year\")\nplt.title(\"Competition Launch Year frequencies\")\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2023-06-26T17:48:37.428019Z","iopub.execute_input":"2023-06-26T17:48:37.428491Z","iopub.status.idle":"2023-06-26T17:48:37.806787Z","shell.execute_reply.started":"2023-06-26T17:48:37.428443Z","shell.execute_reply":"2023-06-26T17:48:37.805584Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"competition_url_numbers = writeups_df[\"Competition URL\"].apply(lambda x: int(x[25:]))\nsns.histplot(competition_url_numbers)\nplt.xlabel(\"Competition URL Number\")\nplt.title(\"Competition URL Number frequencies\")\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2023-06-26T17:50:13.837780Z","iopub.execute_input":"2023-06-26T17:50:13.838168Z","iopub.status.idle":"2023-06-26T17:50:14.136770Z","shell.execute_reply.started":"2023-06-26T17:50:13.838137Z","shell.execute_reply":"2023-06-26T17:50:14.135257Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"year_of_writeups = writeups_df[\"Date of Writeup\"].apply(lambda x: int(x[6:11]))\nsns.histplot(year_of_writeups)\nplt.xlabel(\"Year of Writeup\")\nplt.title(\"Year of Writeup frequencies\")\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2023-06-26T17:48:01.773502Z","iopub.execute_input":"2023-06-26T17:48:01.773924Z","iopub.status.idle":"2023-06-26T17:48:02.176659Z","shell.execute_reply.started":"2023-06-26T17:48:01.773892Z","shell.execute_reply":"2023-06-26T17:48:02.175560Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"writeup_to_rank = lambda x: int(x.split()[0][:-2]) if x.split()[0][:-2].isdigit() else None\nall_writeup_ranks = writeups_df[\"Title of Writeup\"].apply(writeup_to_rank)\nuseful_writeup_ranks = [x for x in list(all_writeup_ranks) if x is not None and x < 100]\nsns.histplot(useful_writeup_ranks)\nplt.xlabel(\"Writeup Rank\")\nplt.title(\"Writeup Rank frequencies\")\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2023-06-26T17:43:14.941984Z","iopub.execute_input":"2023-06-26T17:43:14.942409Z","iopub.status.idle":"2023-06-26T17:43:15.344846Z","shell.execute_reply.started":"2023-06-26T17:43:14.942369Z","shell.execute_reply":"2023-06-26T17:43:15.343738Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"writeup_lengths = writeups_df[\"Writeup\"].apply(lambda x: len(str(x).split()))\nsns.histplot(writeup_lengths)\nplt.xlabel(\"Writeup Length\")\nplt.title(\"Writeup Length frequencies\")\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2023-06-26T17:49:55.652845Z","iopub.execute_input":"2023-06-26T17:49:55.653254Z","iopub.status.idle":"2023-06-26T17:49:56.138997Z","shell.execute_reply.started":"2023-06-26T17:49:55.653220Z","shell.execute_reply":"2023-06-26T17:49:56.137717Z"},"trusted":true},"execution_count":null,"outputs":[]}]}