keesephillips commited on
Commit
d5c1adc
·
verified ·
1 Parent(s): e236d9e

final commit

Browse files
Files changed (1) hide show
  1. notebooks/naive.ipynb +49 -14
notebooks/naive.ipynb CHANGED
@@ -178,7 +178,7 @@
178
  },
179
  {
180
  "cell_type": "code",
181
- "execution_count": 3,
182
  "metadata": {
183
  "id": "PngL0QHq516u"
184
  },
@@ -202,7 +202,7 @@
202
  },
203
  {
204
  "cell_type": "code",
205
- "execution_count": 4,
206
  "metadata": {
207
  "id": "peZyue6t57Mz"
208
  },
@@ -217,7 +217,7 @@
217
  },
218
  {
219
  "cell_type": "code",
220
- "execution_count": 5,
221
  "metadata": {
222
  "id": "p68WNyaf58rS"
223
  },
@@ -230,7 +230,7 @@
230
  },
231
  {
232
  "cell_type": "code",
233
- "execution_count": 6,
234
  "metadata": {
235
  "id": "aSBKxRFa5-O_"
236
  },
@@ -244,7 +244,7 @@
244
  },
245
  {
246
  "cell_type": "code",
247
- "execution_count": 7,
248
  "metadata": {},
249
  "outputs": [],
250
  "source": [
@@ -256,7 +256,7 @@
256
  },
257
  {
258
  "cell_type": "code",
259
- "execution_count": 8,
260
  "metadata": {
261
  "id": "V1bhU5rW6BSY"
262
  },
@@ -271,7 +271,7 @@
271
  },
272
  {
273
  "cell_type": "code",
274
- "execution_count": 9,
275
  "metadata": {
276
  "id": "l6sUWKYC6DCw"
277
  },
@@ -282,7 +282,7 @@
282
  },
283
  {
284
  "cell_type": "code",
285
- "execution_count": 10,
286
  "metadata": {
287
  "id": "XxC0WnlL6EWz"
288
  },
@@ -295,7 +295,25 @@
295
  },
296
  {
297
  "cell_type": "code",
298
- "execution_count": 16,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
299
  "metadata": {
300
  "id": "5HLSc9z36Izn"
301
  },
@@ -310,7 +328,7 @@
310
  },
311
  {
312
  "cell_type": "code",
313
- "execution_count": 17,
314
  "metadata": {},
315
  "outputs": [],
316
  "source": [
@@ -319,7 +337,7 @@
319
  },
320
  {
321
  "cell_type": "code",
322
- "execution_count": 30,
323
  "metadata": {
324
  "id": "k47MaxR65Nq4"
325
  },
@@ -341,7 +359,7 @@
341
  },
342
  {
343
  "cell_type": "code",
344
- "execution_count": 36,
345
  "metadata": {},
346
  "outputs": [],
347
  "source": [
@@ -356,7 +374,7 @@
356
  },
357
  {
358
  "cell_type": "code",
359
- "execution_count": 38,
360
  "metadata": {
361
  "colab": {
362
  "base_uri": "https://localhost:8080/"
@@ -373,7 +391,24 @@
373
  "\n",
374
  "y_test_binary = (y_val >= 0.5).astype(int)\n",
375
  "y_test_items = X_val['album_id'][y_test_binary == 1].tolist()\n",
376
- "\n",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
377
  "precisions = []\n",
378
  "recalls = []\n",
379
  "for i in range(len(X_val)):\n",
 
178
  },
179
  {
180
  "cell_type": "code",
181
+ "execution_count": 44,
182
  "metadata": {
183
  "id": "PngL0QHq516u"
184
  },
 
202
  },
203
  {
204
  "cell_type": "code",
205
+ "execution_count": 45,
206
  "metadata": {
207
  "id": "peZyue6t57Mz"
208
  },
 
217
  },
218
  {
219
  "cell_type": "code",
220
+ "execution_count": 46,
221
  "metadata": {
222
  "id": "p68WNyaf58rS"
223
  },
 
230
  },
231
  {
232
  "cell_type": "code",
233
+ "execution_count": 47,
234
  "metadata": {
235
  "id": "aSBKxRFa5-O_"
236
  },
 
244
  },
245
  {
246
  "cell_type": "code",
247
+ "execution_count": 48,
248
  "metadata": {},
249
  "outputs": [],
250
  "source": [
 
256
  },
257
  {
258
  "cell_type": "code",
259
+ "execution_count": 49,
260
  "metadata": {
261
  "id": "V1bhU5rW6BSY"
262
  },
 
271
  },
272
  {
273
  "cell_type": "code",
274
+ "execution_count": 50,
275
  "metadata": {
276
  "id": "l6sUWKYC6DCw"
277
  },
 
282
  },
283
  {
284
  "cell_type": "code",
285
+ "execution_count": 51,
286
  "metadata": {
287
  "id": "XxC0WnlL6EWz"
288
  },
 
295
  },
296
  {
297
  "cell_type": "code",
298
+ "execution_count": 57,
299
+ "metadata": {},
300
+ "outputs": [],
301
+ "source": [
302
+ "temp = df"
303
+ ]
304
+ },
305
+ {
306
+ "cell_type": "code",
307
+ "execution_count": 78,
308
+ "metadata": {},
309
+ "outputs": [],
310
+ "source": [
311
+ "df = temp.iloc[:100000]"
312
+ ]
313
+ },
314
+ {
315
+ "cell_type": "code",
316
+ "execution_count": 79,
317
  "metadata": {
318
  "id": "5HLSc9z36Izn"
319
  },
 
328
  },
329
  {
330
  "cell_type": "code",
331
+ "execution_count": 80,
332
  "metadata": {},
333
  "outputs": [],
334
  "source": [
 
337
  },
338
  {
339
  "cell_type": "code",
340
+ "execution_count": 81,
341
  "metadata": {
342
  "id": "k47MaxR65Nq4"
343
  },
 
359
  },
360
  {
361
  "cell_type": "code",
362
+ "execution_count": 82,
363
  "metadata": {},
364
  "outputs": [],
365
  "source": [
 
374
  },
375
  {
376
  "cell_type": "code",
377
+ "execution_count": 83,
378
  "metadata": {
379
  "colab": {
380
  "base_uri": "https://localhost:8080/"
 
391
  "\n",
392
  "y_test_binary = (y_val >= 0.5).astype(int)\n",
393
  "y_test_items = X_val['album_id'][y_test_binary == 1].tolist()\n",
394
+ "\n"
395
+ ]
396
+ },
397
+ {
398
+ "cell_type": "code",
399
+ "execution_count": 84,
400
+ "metadata": {},
401
+ "outputs": [
402
+ {
403
+ "name": "stdout",
404
+ "output_type": "stream",
405
+ "text": [
406
+ "Precision: 1.0\n",
407
+ "Recall: 0.0011200716845879738\n"
408
+ ]
409
+ }
410
+ ],
411
+ "source": [
412
  "precisions = []\n",
413
  "recalls = []\n",
414
  "for i in range(len(X_val)):\n",