Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "EDdA-Classification_Analyses_predictions_proba.ipynb",
"provenance": [],
"collapsed_sections": []
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
}
},
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "M-41ZfqIHyi2"
},
"outputs": [],
"source": [
"import pandas as pd\n",
"import csv"
]
},
{
"cell_type": "code",
"source": [
"!wget https://projet.liris.cnrs.fr/geode/EDdA-Classification/predictions/dataset_test_predictions_sgd_tfidf.csv"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "gVaa01O5IQke",
"outputId": "054b0d9d-148a-4cc6-8616-b9e704eab6ea"
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"--2022-02-17 15:51:03-- https://projet.liris.cnrs.fr/geode/EDdA-Classification/predictions/dataset_test_predictions_sgd_tfidf.csv\n",
"Resolving projet.liris.cnrs.fr (projet.liris.cnrs.fr)... 134.214.142.28\n",
"Connecting to projet.liris.cnrs.fr (projet.liris.cnrs.fr)|134.214.142.28|:443... connected.\n",
"HTTP request sent, awaiting response... 200 OK\n",
"Length: 49747105 (47M) [text/csv]\n",
"Saving to: ‘dataset_test_predictions_sgd_tfidf.csv’\n",
"\n",
"dataset_test_predic 100%[===================>] 47.44M 18.8MB/s in 2.5s \n",
"\n",
"2022-02-17 15:51:06 (18.8 MB/s) - ‘dataset_test_predictions_sgd_tfidf.csv’ saved [49747105/49747105]\n",
"\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"df = pd.read_csv(\"dataset_test_predictions_sgd_tfidf.csv\")\n",
"\n",
"df.shape"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "dYVLgduMIQm4",
"outputId": "4e35f288-f81a-428b-8b9e-035c3a1d3c7a"
},
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"(11702, 20)"
]
},
"metadata": {},
"execution_count": 7
}
]
},
{
"cell_type": "code",
"source": [
"df.head()"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 479
},
"id": "Bp50IA0qIQpf",
"outputId": "c4efa4c8-4fac-4349-cc12-a331f89850ad"
},
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/html": [
"\n",
" <div id=\"df-f1cebb7e-2ff0-4e07-8b97-8782c768d931\">\n",
" <div class=\"colab-df-container\">\n",
" <div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Unnamed: 0</th>\n",
" <th>volume</th>\n",
" <th>numero</th>\n",
" <th>head</th>\n",
" <th>normClass</th>\n",
" <th>classEDdA</th>\n",
" <th>author</th>\n",
" <th>id_enccre</th>\n",
" <th>domaine_enccre</th>\n",
" <th>ensemble_domaine_enccre</th>\n",
" <th>content</th>\n",
" <th>contentWithoutClass</th>\n",
" <th>firstParagraph</th>\n",
" <th>nb_words</th>\n",
" <th>predict_proba</th>\n",
" <th>predict_proba2</th>\n",
" <th>predict1</th>\n",
" <th>proba1</th>\n",
" <th>predict2</th>\n",
" <th>proba2</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>0</td>\n",
" <td>8</td>\n",
" <td>1249</td>\n",
" <td>HOCKERLAND</td>\n",
" <td>Géographie</td>\n",
" <td>Géograp.</td>\n",
" <td>Jaucourt</td>\n",
" <td>v8-965-0</td>\n",
" <td>géographie</td>\n",
" <td>Géographie</td>\n",
" <td>HOCKERLAND, (Géograp.) petite contrée,\\n& l'un...</td>\n",
" <td>hockerland petit contrée \\n cercle prusse du...</td>\n",
" <td>hockerland petit contrée \\n cercle prusse du...</td>\n",
" <td>43</td>\n",
" <td>[0.0, 0.0031502678656972283, 0.000415623529573...</td>\n",
" <td>[('Géographie', 0.7849115661795937), ('Métiers...</td>\n",
" <td>Géographie</td>\n",
" <td>0.784912</td>\n",
" <td>Métiers</td>\n",
" <td>0.108011</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>1</td>\n",
" <td>14</td>\n",
" <td>2370</td>\n",
" <td>Rotonde la</td>\n",
" <td>Architecture romaine</td>\n",
" <td>Archit. rom.</td>\n",
" <td>Jaucourt</td>\n",
" <td>v14-1352-1</td>\n",
" <td>architecture</td>\n",
" <td>Architecture</td>\n",
" <td>Rotonde la, (Archit. rom.) nom moderne de\\nl'a...</td>\n",
" <td>rotonde nom moderne \\n ancien panthéon bâti ...</td>\n",
" <td>rotonde nom moderne \\n ancien panthéon bâti ...</td>\n",
" <td>777</td>\n",
" <td>[0.0, 0.0, 0.22553458272522398, 0.689266306891...</td>\n",
" <td>[('Architecture', 0.6892663068918098), ('Antiq...</td>\n",
" <td>Architecture</td>\n",
" <td>0.689266</td>\n",
" <td>Antiquité</td>\n",
" <td>0.225535</td>\n",
" </tr>\n",
Loading
Loading full blame...