From 918d679b8c915bdace73c7e7a224957c623e7b18 Mon Sep 17 00:00:00 2001 From: Yuzhong Liu Date: Tue, 20 Jun 2023 10:50:11 +0800 Subject: [PATCH] Add files via upload --- ...21\346\210\230\350\265\233_baseline.ipynb" | 128 +++++++++++------- 1 file changed, 76 insertions(+), 52 deletions(-) diff --git "a/competition/\347\247\221\345\244\247\350\256\257\351\243\236AI\345\274\200\345\217\221\350\200\205\345\244\247\350\265\2332023/\345\237\272\344\272\216\350\256\272\346\226\207\346\221\230\350\246\201\347\232\204\346\226\207\346\234\254\345\210\206\347\261\273\344\270\216\345\205\263\351\224\256\350\257\215\346\212\275\345\217\226\346\214\221\346\210\230\350\265\233_baseline.ipynb" "b/competition/\347\247\221\345\244\247\350\256\257\351\243\236AI\345\274\200\345\217\221\350\200\205\345\244\247\350\265\2332023/\345\237\272\344\272\216\350\256\272\346\226\207\346\221\230\350\246\201\347\232\204\346\226\207\346\234\254\345\210\206\347\261\273\344\270\216\345\205\263\351\224\256\350\257\215\346\212\275\345\217\226\346\214\221\346\210\230\350\265\233_baseline.ipynb" index 2501396..5f61e68 100644 --- "a/competition/\347\247\221\345\244\247\350\256\257\351\243\236AI\345\274\200\345\217\221\350\200\205\345\244\247\350\265\2332023/\345\237\272\344\272\216\350\256\272\346\226\207\346\221\230\350\246\201\347\232\204\346\226\207\346\234\254\345\210\206\347\261\273\344\270\216\345\205\263\351\224\256\350\257\215\346\212\275\345\217\226\346\214\221\346\210\230\350\265\233_baseline.ipynb" +++ "b/competition/\347\247\221\345\244\247\350\256\257\351\243\236AI\345\274\200\345\217\221\350\200\205\345\244\247\350\265\2332023/\345\237\272\344\272\216\350\256\272\346\226\207\346\221\230\350\246\201\347\232\204\346\226\207\346\234\254\345\210\206\347\261\273\344\270\216\345\205\263\351\224\256\350\257\215\346\212\275\345\217\226\346\214\221\346\210\230\350\265\233_baseline.ipynb" @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 2, "id": "9fadb9cd-fe0b-49c8-b62d-b6ae656d543c", "metadata": { "tags": [] @@ -23,9 +23,17 @@ "simplefilter(\"ignore\", category=ConvergenceWarning)" ] }, + { + "cell_type": "markdown", + "id": "12dcda70-7854-4dd3-b044-9978a0f63c33", + "metadata": {}, + "source": [ + "## TASK1" + ] + }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "id": "2b0cb4c6-ba3e-4be5-b6a0-c3fe821b3cfd", "metadata": { "tags": [] @@ -43,7 +51,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 4, "id": "829bfa2f-4e38-40bf-a2c7-127c0fbf96e5", "metadata": { "tags": [] @@ -75,48 +83,54 @@ " author\n", " abstract\n", " Keywords\n", + " label\n", " \n", " \n", " \n", " \n", " 0\n", " 0\n", - " Monitoring Changes in Intracellular Reactive O...\n", - " Al-Hassan M Mustafa,Ramy Ashry,Oliver H Krämer...\n", - " Reactive oxygen species (ROS) are induced by s...\n", - " Flow cytometry; HDACi; Leukemia; ROS.\n", + " Accessible Visual Artworks for Blind and Visua...\n", + " Quero, Luis Cavazos; Bartolome, Jorge Iranzo; ...\n", + " Despite the use of tactile graphics and audio ...\n", + " accessibility technology; multimodal interacti...\n", + " 0\n", " \n", " \n", " 1\n", " 1\n", - " Source Printer Classification Using Printer Sp...\n", - " Joshi, Sharad; Khanna, Nitin\n", - " The knowledge of the source printer can help i...\n", - " Printer classification; local texture patterns...\n", + " Seizure Detection and Prediction by Parallel M...\n", + " Li, Chenqi; Lammie, Corey; Dong, Xuening; Amir...\n", + " During the past two decades, epileptic seizure...\n", + " CNN; Seizure Detection; Seizure Prediction; EE...\n", + " 1\n", " \n", " \n", " 2\n", " 2\n", - " Plasma-processed CoSn/RGO nanocomposite: A low...\n", - " Omelianovych, Oleksii; Larina, Liudmila L.; Oh...\n", - " The high cost of state-of-the-art Pt counter e...\n", - " Plasma reduction; Bimatalic alloy CoxSn1-x; Re...\n", + " Fast ScanNet: Fast and Dense Analysis of Multi...\n", + " Lin, Huangjing; Chen, Hao; Graham, Simon; Dou,...\n", + " Lymph node metastasis is one of the most impor...\n", + " Histopathology image analysis; computational p...\n", + " 1\n", " \n", " \n", " 3\n", " 3\n", - " Immediate Antiretroviral Therapy: The Need for...\n", - " Mgbako, Ofole; E. Sobieszczyk, Magdalena; Olen...\n", - " Immediate antiretroviral therapy (iART), defin...\n", - " HIV; antiretroviral therapy; rapid; health equity\n", + " Long-Term Effectiveness of Antiretroviral Ther...\n", + " Huang, Peng; Tan, Jingguang; Ma, Wenzhe; Zheng...\n", + " In order to assess the effectiveness of the Ch...\n", + " HIV; ART; mortality; observational cohort stud...\n", + " 0\n", " \n", " \n", " 4\n", " 4\n", - " Design and analysis of an ultra-low-power LC q...\n", - " Lee, Kin Keung; Bryant, Carl; Tormanen, Markus...\n", - " This paper presents the design of an ultra-low...\n", - " Varactor; Spiral inductor; Quadrature generati...\n", + " Real-Time Facial Affective Computing on Mobile...\n", + " Guo, Yuanyuan; Xia, Yifan; Wang, Jing; Yu, Hui...\n", + " Convolutional Neural Networks (CNNs) have beco...\n", + " facial affective computing; convolutional neur...\n", + " 0\n", " \n", " \n", "\n", @@ -124,46 +138,46 @@ ], "text/plain": [ " uuid title \\\n", - "0 0 Monitoring Changes in Intracellular Reactive O... \n", - "1 1 Source Printer Classification Using Printer Sp... \n", - "2 2 Plasma-processed CoSn/RGO nanocomposite: A low... \n", - "3 3 Immediate Antiretroviral Therapy: The Need for... \n", - "4 4 Design and analysis of an ultra-low-power LC q... \n", + "0 0 Accessible Visual Artworks for Blind and Visua... \n", + "1 1 Seizure Detection and Prediction by Parallel M... \n", + "2 2 Fast ScanNet: Fast and Dense Analysis of Multi... \n", + "3 3 Long-Term Effectiveness of Antiretroviral Ther... \n", + "4 4 Real-Time Facial Affective Computing on Mobile... \n", "\n", " author \\\n", - "0 Al-Hassan M Mustafa,Ramy Ashry,Oliver H Krämer... \n", - "1 Joshi, Sharad; Khanna, Nitin \n", - "2 Omelianovych, Oleksii; Larina, Liudmila L.; Oh... \n", - "3 Mgbako, Ofole; E. Sobieszczyk, Magdalena; Olen... \n", - "4 Lee, Kin Keung; Bryant, Carl; Tormanen, Markus... \n", + "0 Quero, Luis Cavazos; Bartolome, Jorge Iranzo; ... \n", + "1 Li, Chenqi; Lammie, Corey; Dong, Xuening; Amir... \n", + "2 Lin, Huangjing; Chen, Hao; Graham, Simon; Dou,... \n", + "3 Huang, Peng; Tan, Jingguang; Ma, Wenzhe; Zheng... \n", + "4 Guo, Yuanyuan; Xia, Yifan; Wang, Jing; Yu, Hui... \n", "\n", " abstract \\\n", - "0 Reactive oxygen species (ROS) are induced by s... \n", - "1 The knowledge of the source printer can help i... \n", - "2 The high cost of state-of-the-art Pt counter e... \n", - "3 Immediate antiretroviral therapy (iART), defin... \n", - "4 This paper presents the design of an ultra-low... \n", + "0 Despite the use of tactile graphics and audio ... \n", + "1 During the past two decades, epileptic seizure... \n", + "2 Lymph node metastasis is one of the most impor... \n", + "3 In order to assess the effectiveness of the Ch... \n", + "4 Convolutional Neural Networks (CNNs) have beco... \n", "\n", - " Keywords \n", - "0 Flow cytometry; HDACi; Leukemia; ROS. \n", - "1 Printer classification; local texture patterns... \n", - "2 Plasma reduction; Bimatalic alloy CoxSn1-x; Re... \n", - "3 HIV; antiretroviral therapy; rapid; health equity \n", - "4 Varactor; Spiral inductor; Quadrature generati... " + " Keywords label \n", + "0 accessibility technology; multimodal interacti... 0 \n", + "1 CNN; Seizure Detection; Seizure Prediction; EE... 1 \n", + "2 Histopathology image analysis; computational p... 1 \n", + "3 HIV; ART; mortality; observational cohort stud... 0 \n", + "4 facial affective computing; convolutional neur... 0 " ] }, - "execution_count": 3, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "test.head()" + "train.head()" ] }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 5, "id": "a4bc6c89-002e-4941-bfb9-ca7406c1ae9e", "metadata": { "tags": [] @@ -176,7 +190,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 6, "id": "371f23ec-03c9-4003-8666-479359bfe6d2", "metadata": { "tags": [] @@ -190,7 +204,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 7, "id": "b4b555b6-373d-43ae-99c8-51b85aec385a", "metadata": { "scrolled": true, @@ -224,7 +238,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 8, "id": "fd736331-1b2b-42e4-aa4c-fd6f2b8436e5", "metadata": { "tags": [] @@ -237,9 +251,17 @@ "test[['uuid', 'Keywords', 'label']].to_csv('submit.csv', index=None)" ] }, + { + "cell_type": "markdown", + "id": "7ce75c4d-915e-4f0b-a142-b16567fda726", + "metadata": {}, + "source": [ + "## TASK2" + ] + }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 9, "id": "2b493756-886a-4a08-81ed-b33db69a1e72", "metadata": {}, "outputs": [], @@ -361,6 +383,8 @@ "for row in test.iterrows():\n", " prediction_keywords = extract_keywords_by_freq(row[1].title, row[1].abstract)\n", " prediction_keywords = [x.title() for x in prediction_keywords]\n", + " if len(prediction_keywords) == 0:\n", + " prediction_keywords = ['A', 'B']\n", " test_words.append('; '.join(prediction_keywords))" ] }, @@ -380,7 +404,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ca2ebf9b-7e1c-4927-bbcf-67b6e13d3cd2", + "id": "b0627479-60ba-45ef-9902-e22abab982df", "metadata": {}, "outputs": [], "source": []