Commit 475e1aea authored by Luca Bellinazzi's avatar Luca Bellinazzi

Added precision-recall diagram with new data

parents d9dcc919 a9e95ed4
......@@ -3,4 +3,6 @@ Project Description.pdf
Pipfile.lock
.ipynb_checkpoints
notebooks/Cornac*
final_notebooks/Cornac*
\ No newline at end of file
final_notebooks/Cornac*
improved_presentation.zip
recsys2020pres/
......@@ -11,7 +11,6 @@ notebook = "*"
numpy = "*"
scikit-learn = "*"
scipy = "*"
pandas = "*"
scikit-surprise = "*"
tabulate = "*"
matplotlib = "*"
......@@ -22,6 +21,9 @@ tqdm = "*"
tensorflow = "==1.15.2"
cornac = "*"
ipywidgets = "*"
seaborn = "*"
pandas = "*"
psutil = "*"
[requires]
python_version = "3.7"
This diff is collapsed.
,Recommender,RMSE,MAE
0,ML100-Random,1.519.,1.219.
1,ML100-GlobalMean,1.126.,0.945.
2,ML100-UserMean,1.202.,0.969.
3,ML100-ItemMean,1.285.,1.035.
4,PDA2018-Random,1.480.,1.185.
5,PDA2018-GlobalMean,1.100.,0.911.
6,PDA2018-UserMean,1.133.,0.928.
7,PDA2018-ItemMean,1.291.,1.044.
,0
AUC,0.9262837945191424
NDCG@10,0.1431713552858465
NDCG@5,0.13567052722183212
Precision@10,0.12301166489925734
Precision@5,0.13022269353128405
Recall@10,0.10242798455629241
Recall@5,0.05489294348187306
Train (s),1.124155044555664
Test (s),2.1430857181549072
AUC,0.8861808114839844
NDCG@10,0.10950214913043983
NDCG@5,0.10262790571668909
Precision@10,0.090400903444384
Precision@5,0.09674383587426794
Recall@10,0.08546566011716605
Recall@5,0.04754483731679537
Train (s),6.681921005249023
Test (s),10.73814582824707
,Recommender,Pre@5,Pre@10,Rec@5,Rec@10,NDCG
0,ML100-MostPop,0.09458023379383684,0.08862911795961753,0.04314858264315116,0.07991957368497055,0.40563214104960577
1,ML100-UserKNN,0.00021253985122210415,0.0005313496280552603,0.00026567481402763017,0.0004018858694735422,0.2856991094984434
2,ML100-ItemKNN,0.0008501594048884166,0.0010626992561105207,0.0007143700554965168,0.0017844491675522494,0.2701701386661647
3,ML100-BPR,0.12029755579171175,0.1131774707757701,0.06340986109159476,0.11885877366497075,0.4578800302093004
4,PDA2018-MostPop,0.07393113885735719,0.07014755959137477,0.03943376546863683,0.06975882028637953,0.34868470064243323
5,PDA2018-UserKNN,0.00026485054861899356,0.0014566780174044627,0.00041472321051008374,0.0031161848899308865,0.26259155670518863
6,PDA2018-ItemKNN,0.004691638289822162,0.005486189935679172,0.0014984576451255133,0.0033302083894116473,0.24735333224100117
7,PDA2018-BPR,0.09621642073401165,0.08817631479379726,0.0569755058582453,0.10090950802547112,0.3904386536039474
,Recommender,Pre@5,Pre@10,Rec@5,Rec@10,NDCG@5,NDCG@10
0,ML100-MostPop,0.21617021276595746,0.19255319148936173,0.07065926711599416,0.11425943901460381,0.23050040907317546,0.22076740254314156
1,ML100-BPR,0.3759574468085106,0.3232978723404255,0.11984306989572834,0.19529138286400322,0.40038777517822666,0.37812153785448827
2,ML100-NCF,0.2542553191489362,0.2372340425531915,0.08398726542161752,0.15225814409205193,0.2690760884154233,0.2702837792958376
3,PDA2018-MostPop,0.21617021276595746,0.19255319148936173,0.07065926711599416,0.11425943901460381,0.23050040907317546,0.22076740254314156
4,PDA2018-BPR,0.38574468085106384,0.3337234042553192,0.13368465768819618,0.22161355205856664,0.41098178715094263,0.3931232445392719
5,PDA2018-NCF,0.2546808510638298,0.23882978723404255,0.08454772647979034,0.1508863193874161,0.26524391856134905,0.268098474553774
,Recommender,Pre@5,Pre@10,Rec@5,Rec@10,NDCG
0,ML100-MostPop,0.09458023379383684,0.08862911795961753,0.04314858264315116,0.07991957368497055,0.40563214104960577
1,ML100-UserKNN,0.00021253985122210415,0.0005313496280552603,0.00026567481402763017,0.0004018858694735422,0.2856991094984434
2,ML100-ItemKNN,0.0008501594048884166,0.0010626992561105207,0.0007143700554965168,0.0017844491675522494,0.2701701386661647
3,ML100-BPR,0.12029755579171175,0.1131774707757701,0.06340986109159476,0.11885877366497075,0.4578800302093004
4,PDA2018-MostPop,0.07393113885735719,0.07014755959137477,0.03943376546863683,0.06975882028637953,0.34868470064243323
5,PDA2018-UserKNN,0.00026485054861899356,0.0014566780174044627,0.00041472321051008374,0.0031161848899308865,0.26259155670518863
6,PDA2018-ItemKNN,0.004691638289822162,0.005486189935679172,0.0014984576451255133,0.0033302083894116473,0.24735333224100117
7,PDA2018-BPR,0.09621642073401165,0.08817631479379726,0.0569755058582453,0.10090950802547112,0.3904386536039474
,Recommender,RMSE,MAE
0,ML100-ubKNN,0.938.,0.732.
1,ML100-ibKNN,0.922.,0.722.
2,PDA-ubKNN,0.893.,0.694.
3,PDA-ibKNN,0.869.,0.679.
,Recommender,Pre@5,Pre@10,Rec@5,Rec@10,NDCG@5,NDCG@10
0,ML100-UserKNN,0.3531868131868133,0.3498901098901099,0.3162827790482524,0.46324916331941884,0.6783069066003377,0.6400635374814715
1,ML100-ItemKNN,0.3417027417027417,0.38585858585858585,0.3223894607097665,0.5153048028620064,0.501534964204805,0.4816176209089155
2,PDA2018-UserKNN,0.3456924754634678,0.3466739367502726,0.3144280065292961,0.4635953786983333,0.6597952610243908,0.6597952610243908
3,PDA2018-ItemKNN,0.33612716763005784,0.37920937042459735,0.31207397929188074,0.5058941152011862,0.5014305787637376,0.49019777213379806
,0
MAE,2.5987645546726577
RMSE,2.7876102501735334
NDCG@10,0.1299243830776887
NDCG@5,0.12445568346923476
Precision@10,0.10680127523910708
Precision@5,0.11519659936238115
Recall@10,0.09963949850729233
Recall@5,0.05733923017521732
Train (s),51.11127495765686
Test (s),12.086863279342651
MAE,2.8235679560935534
RMSE,2.9691053157935787
NDCG@10,0.10468501674655616
NDCG@5,0.09873210060343432
Precision@10,0.08268831414008136
Precision@5,0.09091938833301616
Recall@10,0.08771061729748701
Recall@5,0.04871379084851088
Train (s),251.79725217819214
Test (s),58.72083306312561
,Recommender,Pre@1,Pre@2,Pre@3,Pre@4,Pre@5,Pre@6,Pre@7,Pre@8,Pre@9,Pre@10,Rec@1,Rec@2,Rec@3,Rec@4,Rec@5,Rec@6,Rec@7,Rec@8,Rec@9,Rec@10
0,ML100-MostPop,0.2904255319148936,0.24468085106382978,0.2148936170212766,0.21515957446808512,0.21617021276595746,0.2131205673758865,0.2080547112462006,0.2035904255319149,0.1991725768321513,0.19255319148936173,0.015621627871663903,0.028368891338801407,0.03800067669565796,0.05322395324914424,0.07065926711599416,0.08260025600029156,0.09100439500930173,0.09915452976188423,0.10728272305562822,0.11425943901460381
1,ML100-BPR,0.4542553191489362,0.42127659574468085,0.39751773049645384,0.38218085106382976,0.3680851063829787,0.35567375886524827,0.34422492401215804,0.33284574468085104,0.32588652482269503,0.31989361702127667,0.03210797105242843,0.059319291816427755,0.08103452273955934,0.10108809171766471,0.11974382219445143,0.13618131002543793,0.15066470766529713,0.163356345485936,0.17725483000989303,0.19410650373336544
2,ML100-NCF,0.3191489361702128,0.2925531914893617,0.28120567375886524,0.2747340425531915,0.27106382978723403,0.2648936170212766,0.25638297872340426,0.25199468085106386,0.24751773049645392,0.2415957446808511,0.021573991041361394,0.03766075410680193,0.05391361600278959,0.07144459172437784,0.0880439780334637,0.10303119256113073,0.11568925218400022,0.12795104723660702,0.14001023921887978,0.15178179578244794
3,PDA2018-MostPop,0.2904255319148936,0.24468085106382978,0.2148936170212766,0.21515957446808512,0.21617021276595746,0.2131205673758865,0.2080547112462006,0.2035904255319149,0.1991725768321513,0.19255319148936173,0.015621627871663903,0.028368891338801407,0.03800067669565796,0.05322395324914424,0.07065926711599416,0.08260025600029156,0.09100439500930173,0.09915452976188423,0.10728272305562822,0.11425943901460381
4,PDA2018-BPR,0.4702127659574468,0.45,0.42695035460992914,0.4074468085106383,0.3878723404255319,0.37358156028368794,0.3610942249240121,0.35,0.3404255319148936,0.3317021276595744,0.03639502209451233,0.06666699690373334,0.08984742531060072,0.1147478646575419,0.13586350064966982,0.15502962027419484,0.1720421109251383,0.18893827719403958,0.20524035432186316,0.2193419502969438
5,PDA2018-NCF,0.28829787234042553,0.28297872340425534,0.26985815602836877,0.26382978723404255,0.2587234042553192,0.2542553191489362,0.24863221884498474,0.24188829787234042,0.23770685579196218,0.2318085106382979,0.018908823128367336,0.03712226763303169,0.05296711029031693,0.06963172128758276,0.08401863771127084,0.09924650417856982,0.11477152770597188,0.1251897469642667,0.13853226805837696,0.14892908468898355
,Recommender,RMSE,MAE
0,ML100-Random,1.527.,1.228.
0,ML100-Random,1.519.,1.221.
1,ML100-GlobalMean,1.126.,0.945.
2,ML100-UserMean,1.197.,0.965.
3,ML100-ItemMean,1.271.,1.027.
2,ML100-UserMean,1.042.,0.835.
3,ML100-ItemMean,1.267.,1.027.
4,ML100-UserKNN,0.939.,0.733.
5,ML100-ItemKNN,0.922.,0.721.
5,ML100-ItemKNN,0.923.,0.722.
6,ML100-SVD,0.959.,0.761.
7,ML100-SVDpp,0.924.,0.720.
8,PDA2018-Random,1.481.,1.185.
7,ML100-SVDpp,0.923.,0.720.
8,PDA2018-Random,1.483.,1.187.
9,PDA2018-GlobalMean,1.100.,0.911.
10,PDA2018-UserMean,1.132.,0.928.
11,PDA2018-ItemMean,1.284.,1.040.
10,PDA2018-UserMean,1.024.,0.814.
11,PDA2018-ItemMean,1.214.,0.988.
12,PDA2018-UserKNN,0.895.,0.698.
13,PDA2018-ItemKNN,0.871.,0.680.
13,PDA2018-ItemKNN,0.871.,0.681.
14,PDA2018-SVD,0.908.,0.717.
15,PDA2018-SVDpp,0.873.,0.677.
,Recommender,RMSE,MAE
0,ML100-SVD,0.963.,0.765.
1,PDA-SVD,0.912.,0.720.
TEST:
...
[NeuMF]
| Precision@10 | Precision@5 | Recall@10 | Recall@5 | Train (s) | Test (s)
------ + ------------ + ----------- + --------- + -------- + --------- + --------
Fold 0 | 0.1105 | 0.1141 | 0.1092 | 0.0576 | 76.4134 | 2.3486
Fold 1 | 0.1143 | 0.1228 | 0.1125 | 0.0638 | 60.1376 | 1.9194
Fold 2 | 0.0980 | 0.1028 | 0.0955 | 0.0450 | 62.8222 | 2.2363
Fold 3 | 0.1122 | 0.1218 | 0.1070 | 0.0591 | 62.9154 | 2.2375
Fold 4 | 0.1096 | 0.1164 | 0.1049 | 0.0574 | 60.0225 | 2.2260
------ + ------------ + ----------- + --------- + -------- + --------- + --------
Mean | 0.1089 | 0.1156 | 0.1058 | 0.0566 | 64.4622 | 2.1936
Std | 0.0057 | 0.0072 | 0.0057 | 0.0062 | 6.1045 | 0.1442
TEST:
...
[NeuMF]
| Precision@10 | Precision@5 | Recall@10 | Recall@5 | Train (s) | Test (s)
------ + ------------ + ----------- + --------- + -------- + --------- + --------
Fold 0 | 0.1099 | 0.1139 | 0.1076 | 0.0574 | 65.1578 | 2.3301
Fold 1 | 0.1143 | 0.1273 | 0.1100 | 0.0638 | 59.9542 | 2.1207
Fold 2 | 0.1070 | 0.1145 | 0.1093 | 0.0583 | 61.0977 | 2.1082
Fold 3 | 0.1072 | 0.1199 | 0.1053 | 0.0595 | 59.8027 | 2.5212
Fold 4 | 0.1095 | 0.1181 | 0.1062 | 0.0578 | 61.7677 | 2.2609
------ + ------------ + ----------- + --------- + -------- + --------- + --------
Mean | 0.1096 | 0.1187 | 0.1077 | 0.0594 | 61.5560 | 2.2682
Std | 0.0026 | 0.0048 | 0.0018 | 0.0023 | 1.9426 | 0.1518
TEST:
...
[BPR]
| Precision@10 | Precision@5 | Recall@10 | Recall@5 | Train (s) | Test (s)
------ + ------------ + ----------- + --------- + -------- + --------- + --------
Fold 0 | 0.1133 | 0.1199 | 0.1129 | 0.0603 | 0.7494 | 1.0242
Fold 1 | 0.1186 | 0.1197 | 0.1153 | 0.0579 | 0.7498 | 1.0141
Fold 2 | 0.1096 | 0.1162 | 0.1057 | 0.0575 | 0.7226 | 0.9412
Fold 3 | 0.1216 | 0.1303 | 0.1186 | 0.0608 | 0.7807 | 0.9465
Fold 4 | 0.1162 | 0.1191 | 0.1103 | 0.0601 | 0.7356 | 0.9345
------ + ------------ + ----------- + --------- + -------- + --------- + --------
Mean | 0.1158 | 0.1210 | 0.1126 | 0.0593 | 0.7476 | 0.9721
Std | 0.0042 | 0.0048 | 0.0044 | 0.0014 | 0.0194 | 0.0387
TEST:
...
[NeuMF]
| Precision@10 | Precision@5 | Recall@10 | Recall@5 | Train (s) | Test (s)
------ + ------------ + ----------- + --------- + -------- + --------- + --------
Fold 0 | 0.0876 | 0.0948 | 0.0798 | 0.0399 | 12.7962 | 2.3567
Fold 1 | 0.0859 | 0.0937 | 0.0780 | 0.0410 | 15.3936 | 3.6699
Fold 2 | 0.0897 | 0.0904 | 0.0813 | 0.0414 | 14.8306 | 2.0879
Fold 3 | 0.0945 | 0.0922 | 0.0768 | 0.0332 | 15.3152 | 2.2747
Fold 4 | 0.0922 | 0.1019 | 0.0812 | 0.0410 | 13.6587 | 2.2021
------ + ------------ + ----------- + --------- + -------- + --------- + --------
Mean | 0.0900 | 0.0946 | 0.0794 | 0.0393 | 14.3989 | 2.5183
Std | 0.0031 | 0.0039 | 0.0018 | 0.0031 | 1.0131 | 0.5826
TEST:
...
[NeuMF]
| Precision@10 | Precision@5 | Recall@10 | Recall@5 | Train (s) | Test (s)
------ + ------------ + ----------- + --------- + -------- + --------- + --------
Fold 0 | 0.0867 | 0.0935 | 0.0705 | 0.0356 | 14.6392 | 2.2044
Fold 1 | 0.0843 | 0.0931 | 0.0686 | 0.0387 | 13.8599 | 2.2261
Fold 2 | 0.0877 | 0.0889 | 0.0770 | 0.0398 | 13.5846 | 2.2118
Fold 3 | 0.0945 | 0.1069 | 0.0785 | 0.0428 | 13.5837 | 2.8595
Fold 4 | 0.0896 | 0.1019 | 0.0709 | 0.0410 | 14.1416 | 2.2954
------ + ------------ + ----------- + --------- + -------- + --------- + --------
Mean | 0.0885 | 0.0969 | 0.0731 | 0.0396 | 13.9618 | 2.3594
Std | 0.0034 | 0.0066 | 0.0039 | 0.0024 | 0.3967 | 0.2521
TEST:
...
[NeuMF]
| Precision@10 | Precision@5 | Recall@10 | Recall@5 | Train (s) | Test (s)
------ + ------------ + ----------- + --------- + -------- + --------- + --------
Fold 0 | 0.0875 | 0.0948 | 0.0797 | 0.0399 | 17.3796 | 2.4487
Fold 1 | 0.0867 | 0.0901 | 0.0733 | 0.0375 | 13.6530 | 2.1344
Fold 2 | 0.0884 | 0.0968 | 0.0786 | 0.0452 | 14.2517 | 2.7423
Fold 3 | 0.0938 | 0.1031 | 0.0771 | 0.0433 | 14.1719 | 2.2263
Fold 4 | 0.0914 | 0.0894 | 0.0812 | 0.0401 | 15.3561 | 2.2472
------ + ------------ + ----------- + --------- + -------- + --------- + --------
Mean | 0.0896 | 0.0948 | 0.0780 | 0.0412 | 14.9625 | 2.3598
Std | 0.0027 | 0.0050 | 0.0027 | 0.0027 | 1.3298 | 0.2170
TEST:
...
[BPR]
| Precision@10 | Precision@5 | Recall@10 | Recall@5 | Train (s) | Test (s)
------ + ------------ + ----------- + --------- + -------- + --------- + --------
Fold 0 | 0.1175 | 0.1286 | 0.1123 | 0.0667 | 0.7420 | 0.9427
Fold 1 | 0.1130 | 0.1122 | 0.1059 | 0.0556 | 0.7464 | 0.9503
Fold 2 | 0.1068 | 0.1174 | 0.0984 | 0.0563 | 0.7267 | 0.9546
Fold 3 | 0.1194 | 0.1296 | 0.1116 | 0.0618 | 0.7207 | 0.9657
Fold 4 | 0.1121 | 0.1215 | 0.1039 | 0.0564 | 0.7823 | 0.9629
------ + ------------ + ----------- + --------- + -------- + --------- + --------
Mean | 0.1138 | 0.1219 | 0.1064 | 0.0594 | 0.7436 | 0.9552
Std | 0.0044 | 0.0066 | 0.0051 | 0.0043 | 0.0215 | 0.0084
TEST:
...
[NeuMF]
| Precision@10 | Precision@5 | Recall@10 | Recall@5 | Train (s) | Test (s)
------ + ------------ + ----------- + --------- + -------- + --------- + --------
Fold 0 | 0.0676 | 0.0695 | 0.0670 | 0.0358 | 65.7189 | 13.1239
Fold 1 | 0.0687 | 0.0734 | 0.0679 | 0.0388 | 64.7240 | 12.7163
Fold 2 | 0.0673 | 0.0719 | 0.0676 | 0.0367 | 64.9157 | 11.8832
Fold 3 | 0.0684 | 0.0724 | 0.0681 | 0.0360 | 65.3056 | 12.5296
Fold 4 | 0.0687 | 0.0741 | 0.0651 | 0.0375 | 66.0382 | 11.7290
------ + ------------ + ----------- + --------- + -------- + --------- + --------
Mean | 0.0681 | 0.0723 | 0.0671 | 0.0370 | 65.3405 | 12.3964
Std | 0.0006 | 0.0016 | 0.0011 | 0.0011 | 0.4882 | 0.5212
TEST:
...
[BPR]
| Precision@10 | Precision@5 | Recall@10 | Recall@5 | Train (s) | Test (s)
------ + ------------ + ----------- + --------- + -------- + --------- + --------
Fold 0 | 0.0868 | 0.0924 | 0.0925 | 0.0508 | 4.2208 | 5.1599
Fold 1 | 0.0874 | 0.0940 | 0.0893 | 0.0513 | 4.6050 | 5.3310
Fold 2 | 0.0845 | 0.0890 | 0.0887 | 0.0488 | 4.2514 | 5.1371
Fold 3 | 0.0866 | 0.0911 | 0.0898 | 0.0490 | 4.2919 | 5.1846
Fold 4 | 0.0861 | 0.0929 | 0.0900 | 0.0507 | 4.1313 | 5.2352
------ + ------------ + ----------- + --------- + -------- + --------- + --------
Mean | 0.0863 | 0.0919 | 0.0901 | 0.0501 | 4.3001 | 5.2096
Std | 0.0010 | 0.0017 | 0.0013 | 0.0010 | 0.1614 | 0.0689
TEST:
...
[NeuMF]
| Precision@10 | Precision@5 | Recall@10 | Recall@5 | Train (s) | Test (s)
------ + ------------ + ----------- + --------- + -------- + --------- + --------
Fold 0 | 0.1048 | 0.1097 | 0.1095 | 0.0581 | 207.3038 | 2.0529
Fold 1 | 0.1108 | 0.1107 | 0.1136 | 0.0615 | 205.4511 | 1.9727
Fold 2 | 0.1063 | 0.1121 | 0.1088 | 0.0604 | 209.9511 | 1.9558
Fold 3 | 0.1026 | 0.1078 | 0.1043 | 0.0573 | 206.5772 | 1.8839
Fold 4 | 0.1076 | 0.1170 | 0.1076 | 0.0599 | 205.9596 | 1.9657
------ + ------------ + ----------- + --------- + -------- + --------- + --------
Mean | 0.1064 | 0.1115 | 0.1088 | 0.0594 | 207.0485 | 1.9662
Std | 0.0028 | 0.0031 | 0.0030 | 0.0015 | 1.5780 | 0.0537
TEST:
...
[BPR]
| Precision@10 | Precision@5 | Recall@10 | Recall@5 | Train (s) | Test (s)
------ + ------------ + ----------- + --------- + -------- + --------- + --------
Fold 0 | 0.1157 | 0.1239 | 0.1100 | 0.0653 | 0.8227 | 0.8820
Fold 1 | 0.1187 | 0.1273 | 0.1134 | 0.0610 | 0.6636 | 0.9187
Fold 2 | 0.1134 | 0.1174 | 0.1068 | 0.0588 | 0.7773 | 0.8819
Fold 3 | 0.1184 | 0.1262 | 0.1113 | 0.0591 | 0.6414 | 0.8893
Fold 4 | 0.1138 | 0.1162 | 0.1092 | 0.0580 | 0.6471 | 0.9375
------ + ------------ + ----------- + --------- + -------- + --------- + --------
Mean | 0.1160 | 0.1222 | 0.1101 | 0.0604 | 0.7104 | 0.9019
Std | 0.0022 | 0.0046 | 0.0022 | 0.0026 | 0.0749 | 0.0224
TEST:
...
[NeuMF]
| Precision@10 | Precision@5 | Recall@10 | Recall@5 | Train (s) | Test (s)
------ + ------------ + ----------- + --------- + -------- + --------- + --------
Fold 0 | 0.0802 | 0.0840 | 0.0877 | 0.0462 | 1018.3203 | 11.0891
Fold 1 | 0.0766 | 0.0812 | 0.0831 | 0.0464 | 1005.9940 | 10.4666
Fold 2 | 0.0812 | 0.0844 | 0.0878 | 0.0476 | 1004.4722 | 10.3537
Fold 3 | 0.0791 | 0.0834 | 0.0879 | 0.0479 | 994.2578 | 10.5596
Fold 4 | 0.0793 | 0.0820 | 0.0841 | 0.0452 | 1008.7034 | 10.2073
------ + ------------ + ----------- + --------- + -------- + --------- + --------
Mean | 0.0793 | 0.0830 | 0.0861 | 0.0467 | 1006.3495 | 10.5352
Std | 0.0015 | 0.0012 | 0.0021 | 0.0010 | 7.7292 | 0.3009
TEST:
...
[BPR]
| Precision@10 | Precision@5 | Recall@10 | Recall@5 | Train (s) | Test (s)
------ + ------------ + ----------- + --------- + -------- + --------- + --------
Fold 0 | 0.0851 | 0.0873 | 0.0930 | 0.0496 | 3.3262 | 4.5780
Fold 1 | 0.0874 | 0.0939 | 0.0921 | 0.0513 | 3.4355 | 4.5098
Fold 2 | 0.0879 | 0.0933 | 0.0900 | 0.0494 | 3.3357 | 4.5170
Fold 3 | 0.0842 | 0.0896 | 0.0882 | 0.0485 | 3.3260 | 4.5395
Fold 4 | 0.0873 | 0.0944 | 0.0915 | 0.0519 | 4.4721 | 5.7157
------ + ------------ + ----------- + --------- + -------- + --------- + --------
Mean | 0.0864 | 0.0917 | 0.0910 | 0.0501 | 3.5791 | 4.7720
Std | 0.0014 | 0.0028 | 0.0017 | 0.0013 | 0.4484 | 0.4725
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -181,7 +181,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
......@@ -195,10 +195,10 @@
" \"GlobalMean\": GlobalMeanBaseline(), \n",
" \"UserMean\": UserMeanBaseline(), \n",
" \"ItemMean\": ItemMeanBaseline(),\n",
" #\"UserKNN\": KNNWithMeans(k=60, min_k=1, sim_options={'name': 'pearson_baseline', 'shrinkage': 25, 'user_based': True}),\n",
" #\"ItemKNN\": KNNWithMeans(k=40, min_k=1, sim_options={'name': 'pearson_baseline', 'shrinkage': 25, 'user_based': False}),\n",
" #\"SVD\": SVD(n_epochs=20, n_factors=10, lr_all=0.001, reg_all=0.001),\n",
" #\"SVDpp\": SVDpp(n_epochs=20, n_factors=10, lr_all=0.007, reg_all=0.001)\n",
" \"UserKNN\": KNNWithMeans(k=60, min_k=1, sim_options={'name': 'pearson_baseline', 'shrinkage': 25, 'user_based': True}),\n",
" \"ItemKNN\": KNNWithMeans(k=40, min_k=1, sim_options={'name': 'pearson_baseline', 'shrinkage': 25, 'user_based': False}),\n",
" \"SVD\": SVD(n_epochs=20, n_factors=10, lr_all=0.001, reg_all=0.001),\n",
" \"SVDpp\": SVDpp(n_epochs=20, n_factors=10, lr_all=0.007, reg_all=0.001)\n",
"\n",
"\n",
"}\n",
......@@ -211,7 +211,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 5,
"metadata": {},
"outputs": [
{
......@@ -222,10 +222,78 @@
"Running 5-fold cross validation with GlobalMean on ML100 dataset ...\n",
"Running 5-fold cross validation with UserMean on ML100 dataset ...\n",
"Running 5-fold cross validation with ItemMean on ML100 dataset ...\n",
"Running 5-fold cross validation with UserKNN on ML100 dataset ...\n",
"Estimating biases using als...\n",
"Computing the pearson_baseline similarity matrix...\n",
"Done computing similarity matrix.\n",
"Estimating biases using als...\n",
"Computing the pearson_baseline similarity matrix...\n",
"Done computing similarity matrix.\n",
"Estimating biases using als...\n",
"Computing the pearson_baseline similarity matrix...\n",
"Done computing similarity matrix.\n",
"Estimating biases using als...\n",
"Computing the pearson_baseline similarity matrix...\n",
"Done computing similarity matrix.\n",
"Estimating biases using als...\n",
"Computing the pearson_baseline similarity matrix...\n",
"Done computing similarity matrix.\n",
"Running 5-fold cross validation with ItemKNN on ML100 dataset ...\n",
"Estimating biases using als...\n",
"Computing the pearson_baseline similarity matrix...\n",
"Done computing similarity matrix.\n",
"Estimating biases using als...\n",
"Computing the pearson_baseline similarity matrix...\n",
"Done computing similarity matrix.\n",
"Estimating biases using als...\n",
"Computing the pearson_baseline similarity matrix...\n",
"Done computing similarity matrix.\n",
"Estimating biases using als...\n",
"Computing the pearson_baseline similarity matrix...\n",
"Done computing similarity matrix.\n",
"Estimating biases using als...\n",
"Computing the pearson_baseline similarity matrix...\n",
"Done computing similarity matrix.\n",
"Running 5-fold cross validation with SVD on ML100 dataset ...\n",
"Running 5-fold cross validation with SVDpp on ML100 dataset ...\n",
"Running 5-fold cross validation with Random on PDA2018 dataset ...\n",
"Running 5-fold cross validation with GlobalMean on PDA2018 dataset ...\n",
"Running 5-fold cross validation with UserMean on PDA2018 dataset ...\n",
"Running 5-fold cross validation with ItemMean on PDA2018 dataset ...\n"
"Running 5-fold cross validation with ItemMean on PDA2018 dataset ...\n",
"Running 5-fold cross validation with UserKNN on PDA2018 dataset ...\n",
"Estimating biases using als...\n",
"Computing the pearson_baseline similarity matrix...\n",
"Done computing similarity matrix.\n",
"Estimating biases using als...\n",
"Computing the pearson_baseline similarity matrix...\n",
"Done computing similarity matrix.\n",
"Estimating biases using als...\n",
"Computing the pearson_baseline similarity matrix...\n",
"Done computing similarity matrix.\n",
"Estimating biases using als...\n",
"Computing the pearson_baseline similarity matrix...\n",
"Done computing similarity matrix.\n",
"Estimating biases using als...\n",
"Computing the pearson_baseline similarity matrix...\n",
"Done computing similarity matrix.\n",
"Running 5-fold cross validation with ItemKNN on PDA2018 dataset ...\n",
"Estimating biases using als...\n",
"Computing the pearson_baseline similarity matrix...\n",
"Done computing similarity matrix.\n",
"Estimating biases using als...\n",
"Computing the pearson_baseline similarity matrix...\n",
"Done computing similarity matrix.\n",
"Estimating biases using als...\n",
"Computing the pearson_baseline similarity matrix...\n",
"Done computing similarity matrix.\n",
"Estimating biases using als...\n",
"Computing the pearson_baseline similarity matrix...\n",
"Done computing similarity matrix.\n",
"Estimating biases using als...\n",
"Computing the pearson_baseline similarity matrix...\n",
"Done computing similarity matrix.\n",
"Running 5-fold cross validation with SVD on PDA2018 dataset ...\n",
"Running 5-fold cross validation with SVDpp on PDA2018 dataset ...\n"
]
}
],
......@@ -249,7 +317,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 6,
"metadata": {},
"outputs": [
{
......@@ -258,14 +326,22 @@
"text": [
"| Recommender | RMSE | MAE |\n",
"|:-------------------|:-------|:-------|\n",
"| ML100-Random | 1.522. | 1.222. |\n",
"| ML100-Random | 1.519. | 1.221. |\n",
"| ML100-GlobalMean | 1.126. | 0.945. |\n",
"| ML100-UserMean | 1.042. | 0.835. |\n",
"| ML100-ItemMean | 1.283. | 1.040. |\n",
"| PDA2018-Random | 1.481. | 1.184. |\n",
"| ML100-ItemMean | 1.267. | 1.027. |\n",
"| ML100-UserKNN | 0.939. | 0.733. |\n",
"| ML100-ItemKNN | 0.923. | 0.722. |\n",
"| ML100-SVD | 0.959. | 0.761. |\n",
"| ML100-SVDpp | 0.923. | 0.720. |\n",
"| PDA2018-Random | 1.483. | 1.187. |\n",
"| PDA2018-GlobalMean | 1.100. | 0.911. |\n",
"| PDA2018-UserMean | 1.024. | 0.814. |\n",
"| PDA2018-ItemMean | 1.204. | 0.979. |\n"
"| PDA2018-ItemMean | 1.214. | 0.988. |\n",
"| PDA2018-UserKNN | 0.895. | 0.698. |\n",
"| PDA2018-ItemKNN | 0.871. | 0.681. |\n",
"| PDA2018-SVD | 0.908. | 0.717. |\n",
"| PDA2018-SVDpp | 0.873. | 0.677. |\n"
]
}
],
......@@ -277,7 +353,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
......@@ -285,6 +361,13 @@
"results_df = pd.DataFrame(results_table, columns=[\"Recommender\", \"RMSE\", \"MAE\"])\n",
"results_df.to_csv(\"../data/rating_prediction_results.csv\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -181,7 +181,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Compute item-item similarities "
"# Compute user-item similarities "
]
},
{
......@@ -198,7 +198,7 @@
}
],
"source": [
"# First create the item-user matrix\n",
"# First create the user-item matrix\n",
"unique_users = dataset.user_id.unique()\n",
"unique_items = dataset.item_id.unique()\n",
"data_matrix = np.zeros((unique_users.shape[0], unique_items.shape[0]))\n",
......
This diff is collapsed.
......@@ -495,17 +495,61 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 280,