Spaces:
Runtime error
Runtime error
Update eval notebook
Browse files- notebooks/Model Evaluation.ipynb +20 -148
notebooks/Model Evaluation.ipynb
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": 1,
|
6 |
-
"id": "
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
@@ -13,7 +13,7 @@
|
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "markdown",
|
16 |
-
"id": "
|
17 |
"metadata": {},
|
18 |
"source": [
|
19 |
"# Dependencies"
|
@@ -22,7 +22,7 @@
|
|
22 |
{
|
23 |
"cell_type": "code",
|
24 |
"execution_count": 2,
|
25 |
-
"id": "
|
26 |
"metadata": {},
|
27 |
"outputs": [],
|
28 |
"source": [
|
@@ -33,7 +33,7 @@
|
|
33 |
{
|
34 |
"cell_type": "code",
|
35 |
"execution_count": 3,
|
36 |
-
"id": "
|
37 |
"metadata": {},
|
38 |
"outputs": [],
|
39 |
"source": [
|
@@ -53,7 +53,7 @@
|
|
53 |
},
|
54 |
{
|
55 |
"cell_type": "markdown",
|
56 |
-
"id": "
|
57 |
"metadata": {},
|
58 |
"source": [
|
59 |
"## Globals"
|
@@ -62,7 +62,7 @@
|
|
62 |
{
|
63 |
"cell_type": "code",
|
64 |
"execution_count": 4,
|
65 |
-
"id": "
|
66 |
"metadata": {},
|
67 |
"outputs": [],
|
68 |
"source": [
|
@@ -72,7 +72,7 @@
|
|
72 |
{
|
73 |
"cell_type": "code",
|
74 |
"execution_count": 5,
|
75 |
-
"id": "
|
76 |
"metadata": {},
|
77 |
"outputs": [],
|
78 |
"source": [
|
@@ -83,7 +83,7 @@
|
|
83 |
{
|
84 |
"cell_type": "code",
|
85 |
"execution_count": 6,
|
86 |
-
"id": "
|
87 |
"metadata": {},
|
88 |
"outputs": [],
|
89 |
"source": [
|
@@ -96,7 +96,7 @@
|
|
96 |
{
|
97 |
"cell_type": "code",
|
98 |
"execution_count": 7,
|
99 |
-
"id": "
|
100 |
"metadata": {},
|
101 |
"outputs": [],
|
102 |
"source": [
|
@@ -110,7 +110,7 @@
|
|
110 |
},
|
111 |
{
|
112 |
"cell_type": "markdown",
|
113 |
-
"id": "
|
114 |
"metadata": {},
|
115 |
"source": [
|
116 |
"# `train()` setup"
|
@@ -119,7 +119,7 @@
|
|
119 |
{
|
120 |
"cell_type": "code",
|
121 |
"execution_count": 8,
|
122 |
-
"id": "
|
123 |
"metadata": {},
|
124 |
"outputs": [
|
125 |
{
|
@@ -141,7 +141,7 @@
|
|
141 |
{
|
142 |
"cell_type": "code",
|
143 |
"execution_count": 9,
|
144 |
-
"id": "
|
145 |
"metadata": {},
|
146 |
"outputs": [],
|
147 |
"source": [
|
@@ -157,7 +157,7 @@
|
|
157 |
{
|
158 |
"cell_type": "code",
|
159 |
"execution_count": 10,
|
160 |
-
"id": "
|
161 |
"metadata": {},
|
162 |
"outputs": [],
|
163 |
"source": [
|
@@ -167,7 +167,7 @@
|
|
167 |
{
|
168 |
"cell_type": "code",
|
169 |
"execution_count": 11,
|
170 |
-
"id": "
|
171 |
"metadata": {},
|
172 |
"outputs": [],
|
173 |
"source": [
|
@@ -177,7 +177,7 @@
|
|
177 |
},
|
178 |
{
|
179 |
"cell_type": "markdown",
|
180 |
-
"id": "
|
181 |
"metadata": {},
|
182 |
"source": [
|
183 |
"# Train/Test"
|
@@ -186,7 +186,7 @@
|
|
186 |
{
|
187 |
"cell_type": "code",
|
188 |
"execution_count": 12,
|
189 |
-
"id": "
|
190 |
"metadata": {},
|
191 |
"outputs": [
|
192 |
{
|
@@ -2125,7 +2125,7 @@
|
|
2125 |
},
|
2126 |
{
|
2127 |
"cell_type": "markdown",
|
2128 |
-
"id": "
|
2129 |
"metadata": {},
|
2130 |
"source": [
|
2131 |
"# Visualizations"
|
@@ -2134,7 +2134,7 @@
|
|
2134 |
{
|
2135 |
"cell_type": "code",
|
2136 |
"execution_count": 13,
|
2137 |
-
"id": "
|
2138 |
"metadata": {},
|
2139 |
"outputs": [],
|
2140 |
"source": [
|
@@ -2145,130 +2145,10 @@
|
|
2145 |
"testing_loss = history[3]"
|
2146 |
]
|
2147 |
},
|
2148 |
-
{
|
2149 |
-
"cell_type": "code",
|
2150 |
-
"execution_count": 14,
|
2151 |
-
"id": "e2400f45",
|
2152 |
-
"metadata": {},
|
2153 |
-
"outputs": [
|
2154 |
-
{
|
2155 |
-
"data": {
|
2156 |
-
"text/plain": [
|
2157 |
-
"[0.8374877450980392,\n",
|
2158 |
-
" 0.8210804738562091,\n",
|
2159 |
-
" 0.7776654411764705,\n",
|
2160 |
-
" 0.8229084967320262,\n",
|
2161 |
-
" 0.8986928104575163,\n",
|
2162 |
-
" 0.9012969771241829,\n",
|
2163 |
-
" 0.9519035947712419,\n",
|
2164 |
-
" 0.9622385620915032,\n",
|
2165 |
-
" 0.9646691176470588,\n",
|
2166 |
-
" 0.9626674836601308,\n",
|
2167 |
-
" 0.9725674019607843,\n",
|
2168 |
-
" 0.9748243464052287,\n",
|
2169 |
-
" 0.9399244281045752,\n",
|
2170 |
-
" 0.9599816176470587,\n",
|
2171 |
-
" 0.9701368464052288,\n",
|
2172 |
-
" 0.9713541666666666,\n",
|
2173 |
-
" 0.9742177287581698,\n",
|
2174 |
-
" 0.9750837418300653,\n",
|
2175 |
-
" 0.9717013888888889,\n",
|
2176 |
-
" 0.9637949346405228,\n",
|
2177 |
-
" 0.911188725490196,\n",
|
2178 |
-
" 0.9630187908496732,\n",
|
2179 |
-
" 0.9770812908496732,\n",
|
2180 |
-
" 0.9781209150326797,\n",
|
2181 |
-
" 0.983766339869281,\n",
|
2182 |
-
" 0.9860232843137254,\n",
|
2183 |
-
" 0.9878451797385621,\n",
|
2184 |
-
" 0.9881944444444445,\n",
|
2185 |
-
" 0.9877593954248365,\n",
|
2186 |
-
" 0.9890625,\n",
|
2187 |
-
" 0.9874121732026143,\n",
|
2188 |
-
" 0.9896691176470588,\n",
|
2189 |
-
" 0.9783803104575163,\n",
|
2190 |
-
" 0.9782087418300652,\n",
|
2191 |
-
" 0.9789052287581699,\n",
|
2192 |
-
" 0.9285559640522875,\n",
|
2193 |
-
" 0.9646670751633987,\n",
|
2194 |
-
" 0.9842871732026143,\n",
|
2195 |
-
" 0.9876736111111111,\n",
|
2196 |
-
" 0.9861111111111112,\n",
|
2197 |
-
" 0.9729166666666667,\n",
|
2198 |
-
" 0.9882802287581699,\n",
|
2199 |
-
" 0.9895812908496732,\n",
|
2200 |
-
" 0.9901041666666667,\n",
|
2201 |
-
" 0.9905371732026143,\n",
|
2202 |
-
" 0.9928819444444444,\n",
|
2203 |
-
" 0.9944444444444445,\n",
|
2204 |
-
" 0.9946180555555556,\n",
|
2205 |
-
" 0.9946180555555556,\n",
|
2206 |
-
" 0.9945302287581699,\n",
|
2207 |
-
" 0.9947916666666666,\n",
|
2208 |
-
" 0.9946160130718954,\n",
|
2209 |
-
" 0.9907986111111111,\n",
|
2210 |
-
" 0.9944444444444445,\n",
|
2211 |
-
" 0.9953125,\n",
|
2212 |
-
" 0.9956597222222222,\n",
|
2213 |
-
" 0.9953125,\n",
|
2214 |
-
" 0.9952246732026143,\n",
|
2215 |
-
" 0.9963541666666667,\n",
|
2216 |
-
" 0.9963541666666667,\n",
|
2217 |
-
" 0.9961785130718954,\n",
|
2218 |
-
" 0.9963541666666667,\n",
|
2219 |
-
" 0.9962663398692809,\n",
|
2220 |
-
" 0.9963541666666667,\n",
|
2221 |
-
" 0.9962663398692809,\n",
|
2222 |
-
" 0.9963541666666667,\n",
|
2223 |
-
" 0.9962663398692809,\n",
|
2224 |
-
" 0.9963541666666667,\n",
|
2225 |
-
" 0.9963541666666667,\n",
|
2226 |
-
" 0.9963541666666667,\n",
|
2227 |
-
" 0.9963541666666667,\n",
|
2228 |
-
" 0.9963541666666667,\n",
|
2229 |
-
" 0.9963541666666667,\n",
|
2230 |
-
" 0.9963541666666667,\n",
|
2231 |
-
" 0.9963541666666667,\n",
|
2232 |
-
" 0.9961785130718954,\n",
|
2233 |
-
" 0.9963541666666667,\n",
|
2234 |
-
" 0.9963541666666667,\n",
|
2235 |
-
" 0.9963541666666667,\n",
|
2236 |
-
" 0.9963541666666667,\n",
|
2237 |
-
" 0.9962663398692809,\n",
|
2238 |
-
" 0.9961785130718954,\n",
|
2239 |
-
" 0.9963541666666667,\n",
|
2240 |
-
" 0.9963541666666667,\n",
|
2241 |
-
" 0.9963541666666667,\n",
|
2242 |
-
" 0.9962663398692809,\n",
|
2243 |
-
" 0.9962663398692809,\n",
|
2244 |
-
" 0.9962663398692809,\n",
|
2245 |
-
" 0.9963541666666667,\n",
|
2246 |
-
" 0.9963541666666667,\n",
|
2247 |
-
" 0.9962663398692809,\n",
|
2248 |
-
" 0.9963541666666667,\n",
|
2249 |
-
" 0.9963541666666667,\n",
|
2250 |
-
" 0.9963541666666667,\n",
|
2251 |
-
" 0.9963541666666667,\n",
|
2252 |
-
" 0.9963541666666667,\n",
|
2253 |
-
" 0.9963541666666667,\n",
|
2254 |
-
" 0.9963541666666667,\n",
|
2255 |
-
" 0.9963541666666667,\n",
|
2256 |
-
" 0.9963541666666667]"
|
2257 |
-
]
|
2258 |
-
},
|
2259 |
-
"execution_count": 14,
|
2260 |
-
"metadata": {},
|
2261 |
-
"output_type": "execute_result"
|
2262 |
-
}
|
2263 |
-
],
|
2264 |
-
"source": [
|
2265 |
-
"training_acc"
|
2266 |
-
]
|
2267 |
-
},
|
2268 |
{
|
2269 |
"cell_type": "code",
|
2270 |
"execution_count": 15,
|
2271 |
-
"id": "
|
2272 |
"metadata": {},
|
2273 |
"outputs": [
|
2274 |
{
|
@@ -2295,7 +2175,7 @@
|
|
2295 |
{
|
2296 |
"cell_type": "code",
|
2297 |
"execution_count": 16,
|
2298 |
-
"id": "
|
2299 |
"metadata": {},
|
2300 |
"outputs": [
|
2301 |
{
|
@@ -2318,14 +2198,6 @@
|
|
2318 |
"ax[1].plot(testing_loss)\n",
|
2319 |
"ax[1].title.set_text(\"Testing\")"
|
2320 |
]
|
2321 |
-
},
|
2322 |
-
{
|
2323 |
-
"cell_type": "code",
|
2324 |
-
"execution_count": null,
|
2325 |
-
"id": "5baf98fd",
|
2326 |
-
"metadata": {},
|
2327 |
-
"outputs": [],
|
2328 |
-
"source": []
|
2329 |
}
|
2330 |
],
|
2331 |
"metadata": {
|
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
"execution_count": 1,
|
6 |
+
"id": "2d4667c5",
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
9 |
"source": [
|
|
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "markdown",
|
16 |
+
"id": "524483a8",
|
17 |
"metadata": {},
|
18 |
"source": [
|
19 |
"# Dependencies"
|
|
|
22 |
{
|
23 |
"cell_type": "code",
|
24 |
"execution_count": 2,
|
25 |
+
"id": "4c51929f",
|
26 |
"metadata": {},
|
27 |
"outputs": [],
|
28 |
"source": [
|
|
|
33 |
{
|
34 |
"cell_type": "code",
|
35 |
"execution_count": 3,
|
36 |
+
"id": "8f19f1c8",
|
37 |
"metadata": {},
|
38 |
"outputs": [],
|
39 |
"source": [
|
|
|
53 |
},
|
54 |
{
|
55 |
"cell_type": "markdown",
|
56 |
+
"id": "4f51b4f8",
|
57 |
"metadata": {},
|
58 |
"source": [
|
59 |
"## Globals"
|
|
|
62 |
{
|
63 |
"cell_type": "code",
|
64 |
"execution_count": 4,
|
65 |
+
"id": "6f1716bf",
|
66 |
"metadata": {},
|
67 |
"outputs": [],
|
68 |
"source": [
|
|
|
72 |
{
|
73 |
"cell_type": "code",
|
74 |
"execution_count": 5,
|
75 |
+
"id": "13fa6700",
|
76 |
"metadata": {},
|
77 |
"outputs": [],
|
78 |
"source": [
|
|
|
83 |
{
|
84 |
"cell_type": "code",
|
85 |
"execution_count": 6,
|
86 |
+
"id": "152c1fbf",
|
87 |
"metadata": {},
|
88 |
"outputs": [],
|
89 |
"source": [
|
|
|
96 |
{
|
97 |
"cell_type": "code",
|
98 |
"execution_count": 7,
|
99 |
+
"id": "98cf668e",
|
100 |
"metadata": {},
|
101 |
"outputs": [],
|
102 |
"source": [
|
|
|
110 |
},
|
111 |
{
|
112 |
"cell_type": "markdown",
|
113 |
+
"id": "063c13a4",
|
114 |
"metadata": {},
|
115 |
"source": [
|
116 |
"# `train()` setup"
|
|
|
119 |
{
|
120 |
"cell_type": "code",
|
121 |
"execution_count": 8,
|
122 |
+
"id": "19b58a13",
|
123 |
"metadata": {},
|
124 |
"outputs": [
|
125 |
{
|
|
|
141 |
{
|
142 |
"cell_type": "code",
|
143 |
"execution_count": 9,
|
144 |
+
"id": "848745e7",
|
145 |
"metadata": {},
|
146 |
"outputs": [],
|
147 |
"source": [
|
|
|
157 |
{
|
158 |
"cell_type": "code",
|
159 |
"execution_count": 10,
|
160 |
+
"id": "67a76338",
|
161 |
"metadata": {},
|
162 |
"outputs": [],
|
163 |
"source": [
|
|
|
167 |
{
|
168 |
"cell_type": "code",
|
169 |
"execution_count": 11,
|
170 |
+
"id": "5c5b08c3",
|
171 |
"metadata": {},
|
172 |
"outputs": [],
|
173 |
"source": [
|
|
|
177 |
},
|
178 |
{
|
179 |
"cell_type": "markdown",
|
180 |
+
"id": "e6eb6722",
|
181 |
"metadata": {},
|
182 |
"source": [
|
183 |
"# Train/Test"
|
|
|
186 |
{
|
187 |
"cell_type": "code",
|
188 |
"execution_count": 12,
|
189 |
+
"id": "f4b5c789",
|
190 |
"metadata": {},
|
191 |
"outputs": [
|
192 |
{
|
|
|
2125 |
},
|
2126 |
{
|
2127 |
"cell_type": "markdown",
|
2128 |
+
"id": "572ae86d",
|
2129 |
"metadata": {},
|
2130 |
"source": [
|
2131 |
"# Visualizations"
|
|
|
2134 |
{
|
2135 |
"cell_type": "code",
|
2136 |
"execution_count": 13,
|
2137 |
+
"id": "0b986ac4",
|
2138 |
"metadata": {},
|
2139 |
"outputs": [],
|
2140 |
"source": [
|
|
|
2145 |
"testing_loss = history[3]"
|
2146 |
]
|
2147 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2148 |
{
|
2149 |
"cell_type": "code",
|
2150 |
"execution_count": 15,
|
2151 |
+
"id": "5cfbedcc",
|
2152 |
"metadata": {},
|
2153 |
"outputs": [
|
2154 |
{
|
|
|
2175 |
{
|
2176 |
"cell_type": "code",
|
2177 |
"execution_count": 16,
|
2178 |
+
"id": "2475aebc",
|
2179 |
"metadata": {},
|
2180 |
"outputs": [
|
2181 |
{
|
|
|
2198 |
"ax[1].plot(testing_loss)\n",
|
2199 |
"ax[1].title.set_text(\"Testing\")"
|
2200 |
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2201 |
}
|
2202 |
],
|
2203 |
"metadata": {
|