56 KiB
56 KiB
Self made simplified I-KNN
import helpers
import pandas as pd
import numpy as np
import scipy.sparse as sparse
from collections import defaultdict
from itertools import chain
import random
train_read = pd.read_csv("./Datasets/ml-100k/train.csv", sep="\t", header=None)
test_read = pd.read_csv("./Datasets/ml-100k/test.csv", sep="\t", header=None)
(
train_ui,
test_ui,
user_code_id,
user_id_code,
item_code_id,
item_id_code,
) = helpers.data_to_csr(train_read, test_read)
class IKNN:
def fit(self, train_ui):
self.train_ui = train_ui
train_iu = train_ui.transpose()
norms = np.linalg.norm(
train_iu.A, axis=1
) # here we compute length of each item ratings vector
norms = np.vectorize(lambda x: max(x, 1))(
norms[:, None]
) # to avoid dividing by zero
normalized_train_iu = sparse.csr_matrix(train_iu / norms)
self.similarity_matrix_ii = (
normalized_train_iu * normalized_train_iu.transpose()
)
self.estimations = np.array(
train_ui
* self.similarity_matrix_ii
/ ((train_ui > 0) * self.similarity_matrix_ii)
)
def recommend(self, user_code_id, item_code_id, topK=10):
top_k = defaultdict(list)
for nb_user, user in enumerate(self.estimations):
user_rated = self.train_ui.indices[
self.train_ui.indptr[nb_user] : self.train_ui.indptr[nb_user + 1]
]
for item, score in enumerate(user):
if item not in user_rated and not np.isnan(score):
top_k[user_code_id[nb_user]].append((item_code_id[item], score))
result = []
# Let's choose k best items in the format: (user, item1, score1, item2, score2, ...)
for uid, item_scores in top_k.items():
item_scores.sort(key=lambda x: x[1], reverse=True)
result.append([uid] + list(chain(*item_scores[:topK])))
return result
def estimate(self, user_code_id, item_code_id, test_ui):
result = []
for user, item in zip(*test_ui.nonzero()):
result.append(
[
user_code_id[user],
item_code_id[item],
self.estimations[user, item]
if not np.isnan(self.estimations[user, item])
else 1,
]
)
return result
# toy example
toy_train_read = pd.read_csv(
"./Datasets/toy-example/train.csv",
sep="\t",
header=None,
names=["user", "item", "rating", "timestamp"],
)
toy_test_read = pd.read_csv(
"./Datasets/toy-example/test.csv",
sep="\t",
header=None,
names=["user", "item", "rating", "timestamp"],
)
(
toy_train_ui,
toy_test_ui,
toy_user_code_id,
toy_user_id_code,
toy_item_code_id,
toy_item_id_code,
) = helpers.data_to_csr(toy_train_read, toy_test_read)
model = IKNN()
model.fit(toy_train_ui)
print("toy train ui:")
display(toy_train_ui.A)
print("similarity matrix:")
display(model.similarity_matrix_ii.A)
print("estimations matrix:")
display(model.estimations)
model.recommend(toy_user_code_id, toy_item_code_id)
toy train ui:
array([[3, 4, 0, 0, 5, 0, 0, 4], [0, 1, 2, 3, 0, 0, 0, 0], [0, 0, 0, 5, 0, 3, 4, 0]])
similarity matrix:
array([[1. , 0.9701425 , 0. , 0. , 1. , 0. , 0. , 1. ], [0.9701425 , 1. , 0.24253563, 0.12478355, 0.9701425 , 0. , 0. , 0.9701425 ], [0. , 0.24253563, 1. , 0.51449576, 0. , 0. , 0. , 0. ], [0. , 0.12478355, 0.51449576, 1. , 0. , 0.85749293, 0.85749293, 0. ], [1. , 0.9701425 , 0. , 0. , 1. , 0. , 0. , 1. ], [0. , 0. , 0. , 0.85749293, 0. , 1. , 1. , 0. ], [0. , 0. , 0. , 0.85749293, 0. , 1. , 1. , 0. ], [1. , 0.9701425 , 0. , 0. , 1. , 0. , 0. , 1. ]])
estimations matrix:
array([[4. , 4. , 4. , 4. , 4. , nan, nan, 4. ], [1. , 1.35990333, 2.15478388, 2.53390319, 1. , 3. , 3. , 1. ], [ nan, 5. , 5. , 4.05248907, nan, 3.95012863, 3.95012863, nan]])
[[0, 20, 4.0, 30, 4.0], [10, 50, 3.0, 60, 3.0, 0, 1.0, 40, 1.0, 70, 1.0], [20, 10, 5.0, 20, 5.0]]
model = IKNN()
model.fit(train_ui)
top_n = pd.DataFrame(model.recommend(user_code_id, item_code_id, topK=10))
top_n.to_csv(
"Recommendations generated/ml-100k/Self_IKNN_reco.csv", index=False, header=False
)
estimations = pd.DataFrame(model.estimate(user_code_id, item_code_id, test_ui))
estimations.to_csv(
"Recommendations generated/ml-100k/Self_IKNN_estimations.csv",
index=False,
header=False,
)
import evaluation_measures as ev
estimations_df = pd.read_csv(
"Recommendations generated/ml-100k/Self_IKNN_estimations.csv", header=None
)
reco = np.loadtxt("Recommendations generated/ml-100k/Self_IKNN_reco.csv", delimiter=",")
ev.evaluate(
test=pd.read_csv("./Datasets/ml-100k/test.csv", sep="\t", header=None),
estimations_df=estimations_df,
reco=reco,
super_reactions=[4, 5],
)
943it [00:00, 8576.73it/s]
RMSE | MAE | precision | recall | F_1 | F_05 | precision_super | recall_super | NDCG | mAP | MRR | LAUC | HR | H2R | Reco in test | Test coverage | Shannon | Gini | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 1.018363 | 0.808793 | 0.000318 | 0.000108 | 0.00014 | 0.000189 | 0.0 | 0.0 | 0.000214 | 0.000037 | 0.000368 | 0.496391 | 0.003181 | 0.0 | 0.392153 | 0.11544 | 4.174741 | 0.965327 |
dir_path = "Recommendations generated/ml-100k/"
super_reactions = [4, 5]
test = pd.read_csv("./Datasets/ml-100k/test.csv", sep="\t", header=None)
ev.evaluate_all(test, dir_path, super_reactions)
943it [00:00, 7330.28it/s] 943it [00:00, 7827.86it/s] 943it [00:00, 8071.29it/s] 943it [00:00, 8658.58it/s] 943it [00:00, 8305.62it/s] 943it [00:00, 8619.80it/s] 943it [00:00, 8313.50it/s] 943it [00:00, 8324.13it/s] 943it [00:00, 8154.03it/s] 943it [00:00, 7567.74it/s] 943it [00:00, 7721.03it/s]
Model | RMSE | MAE | precision | recall | F_1 | F_05 | precision_super | recall_super | NDCG | mAP | MRR | LAUC | HR | H2R | Reco in test | Test coverage | Shannon | Gini | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | Self_TopPop | 2.508258 | 2.217909 | 0.188865 | 0.116919 | 0.118732 | 0.141584 | 0.130472 | 0.137473 | 0.214651 | 0.111707 | 0.400939 | 0.555546 | 0.765642 | 0.492047 | 1.000000 | 0.038961 | 3.159079 | 0.987317 |
0 | Ready_Baseline | 0.949459 | 0.752487 | 0.091410 | 0.037652 | 0.046030 | 0.061286 | 0.079614 | 0.056463 | 0.095957 | 0.043178 | 0.198193 | 0.515501 | 0.437964 | 0.239661 | 1.000000 | 0.033911 | 2.836513 | 0.991139 |
0 | Self_KNNSurprisetask | 0.946255 | 0.745209 | 0.083457 | 0.032848 | 0.041227 | 0.055493 | 0.074785 | 0.048890 | 0.089577 | 0.040902 | 0.189057 | 0.513076 | 0.417815 | 0.217391 | 0.888547 | 0.130592 | 3.611806 | 0.978659 |
0 | Self_GlobalAvg | 1.125760 | 0.943534 | 0.061188 | 0.025968 | 0.031383 | 0.041343 | 0.040558 | 0.032107 | 0.067695 | 0.027470 | 0.171187 | 0.509546 | 0.384942 | 0.142100 | 1.000000 | 0.025974 | 2.711772 | 0.992003 |
0 | Ready_Random | 1.528005 | 1.227604 | 0.042842 | 0.019173 | 0.022234 | 0.028926 | 0.026502 | 0.019532 | 0.044202 | 0.015665 | 0.107737 | 0.506081 | 0.313892 | 0.080594 | 0.986108 | 0.182540 | 5.094973 | 0.907749 |
0 | Ready_I-KNN | 1.030386 | 0.813067 | 0.026087 | 0.006908 | 0.010593 | 0.016046 | 0.021137 | 0.009522 | 0.024214 | 0.008958 | 0.048068 | 0.499885 | 0.154825 | 0.072110 | 0.402333 | 0.434343 | 5.133650 | 0.877999 |
0 | Ready_I-KNNBaseline | 0.935327 | 0.737424 | 0.002545 | 0.000755 | 0.001105 | 0.001602 | 0.002253 | 0.000930 | 0.003444 | 0.001362 | 0.011760 | 0.496724 | 0.021209 | 0.004242 | 0.482821 | 0.059885 | 2.232578 | 0.994487 |
0 | Ready_U-KNN | 1.023495 | 0.807913 | 0.000742 | 0.000205 | 0.000305 | 0.000449 | 0.000536 | 0.000198 | 0.000845 | 0.000274 | 0.002744 | 0.496441 | 0.007423 | 0.000000 | 0.602121 | 0.010823 | 2.089186 | 0.995706 |
0 | Self_TopRated | 1.030712 | 0.820904 | 0.000954 | 0.000188 | 0.000298 | 0.000481 | 0.000644 | 0.000223 | 0.001043 | 0.000335 | 0.003348 | 0.496433 | 0.009544 | 0.000000 | 0.699046 | 0.005051 | 1.945910 | 0.995669 |
0 | Self_BaselineUI | 0.967585 | 0.762740 | 0.000954 | 0.000170 | 0.000278 | 0.000463 | 0.000644 | 0.000189 | 0.000752 | 0.000168 | 0.001677 | 0.496424 | 0.009544 | 0.000000 | 0.600530 | 0.005051 | 1.803126 | 0.996380 |
0 | Self_IKNN | 1.018363 | 0.808793 | 0.000318 | 0.000108 | 0.000140 | 0.000189 | 0.000000 | 0.000000 | 0.000214 | 0.000037 | 0.000368 | 0.496391 | 0.003181 | 0.000000 | 0.392153 | 0.115440 | 4.174741 | 0.965327 |
Ready-made KNNs - Surprise implementation
I-KNN - basic
import helpers
import surprise as sp
sim_options = {
"name": "cosine",
"user_based": False,
} # compute similarities between items
algo = sp.KNNBasic(sim_options=sim_options)
helpers.ready_made(
algo,
reco_path="Recommendations generated/ml-100k/Ready_I-KNN_reco.csv",
estimations_path="Recommendations generated/ml-100k/Ready_I-KNN_estimations.csv",
)
Computing the cosine similarity matrix... Done computing similarity matrix. Generating predictions... Generating top N recommendations... Generating predictions...
U-KNN - basic
sim_options = {
"name": "cosine",
"user_based": True,
} # compute similarities between users
algo = sp.KNNBasic(sim_options=sim_options)
helpers.ready_made(
algo,
reco_path="Recommendations generated/ml-100k/Ready_U-KNN_reco.csv",
estimations_path="Recommendations generated/ml-100k/Ready_U-KNN_estimations.csv",
)
Computing the cosine similarity matrix... Done computing similarity matrix. Generating predictions...
[0;31m---------------------------------------------------------------------------[0m [0;31mKeyboardInterrupt[0m Traceback (most recent call last) [0;32m<ipython-input-25-925aeb5e3f18>[0m in [0;36m<module>[0;34m[0m [1;32m 8[0m [0malgo[0m[0;34m,[0m[0;34m[0m[0;34m[0m[0m [1;32m 9[0m [0mreco_path[0m[0;34m=[0m[0;34m"Recommendations generated/ml-100k/Ready_U-KNN_reco.csv"[0m[0;34m,[0m[0;34m[0m[0;34m[0m[0m [0;32m---> 10[0;31m [0mestimations_path[0m[0;34m=[0m[0;34m"Recommendations generated/ml-100k/Ready_U-KNN_estimations.csv"[0m[0;34m,[0m[0;34m[0m[0;34m[0m[0m [0m[1;32m 11[0m ) [0;32m~/Desktop/helpers.py[0m in [0;36mready_made[0;34m(algo, reco_path, estimations_path)[0m [1;32m 64[0m [0mantitrainset[0m [0;34m=[0m [0mtrainset[0m[0;34m.[0m[0mbuild_anti_testset[0m[0;34m([0m[0;34m)[0m [0;31m# We want to predict ratings of pairs (user, item) which are not in train set[0m[0;34m[0m[0;34m[0m[0m [1;32m 65[0m [0mprint[0m[0;34m([0m[0;34m'Generating predictions...'[0m[0;34m)[0m[0;34m[0m[0;34m[0m[0m [0;32m---> 66[0;31m [0mpredictions[0m [0;34m=[0m [0malgo[0m[0;34m.[0m[0mtest[0m[0;34m([0m[0mantitrainset[0m[0;34m)[0m[0;34m[0m[0;34m[0m[0m [0m[1;32m 67[0m [0mprint[0m[0;34m([0m[0;34m'Generating top N recommendations...'[0m[0;34m)[0m[0;34m[0m[0;34m[0m[0m [1;32m 68[0m [0mtop_n[0m [0;34m=[0m [0mget_top_n[0m[0;34m([0m[0mpredictions[0m[0;34m,[0m [0mn[0m[0;34m=[0m[0;36m10[0m[0;34m)[0m[0;34m[0m[0;34m[0m[0m [0;32m~/.local/lib/python3.7/site-packages/surprise/prediction_algorithms/algo_base.py[0m in [0;36mtest[0;34m(self, testset, verbose)[0m [1;32m 166[0m [0mr_ui_trans[0m[0;34m,[0m[0;34m[0m[0;34m[0m[0m [1;32m 167[0m verbose=verbose) [0;32m--> 168[0;31m for (uid, iid, r_ui_trans) in testset] [0m[1;32m 169[0m [0;32mreturn[0m [0mpredictions[0m[0;34m[0m[0;34m[0m[0m [1;32m 170[0m [0;34m[0m[0m [0;32m~/.local/lib/python3.7/site-packages/surprise/prediction_algorithms/algo_base.py[0m in [0;36m<listcomp>[0;34m(.0)[0m [1;32m 166[0m [0mr_ui_trans[0m[0;34m,[0m[0;34m[0m[0;34m[0m[0m [1;32m 167[0m verbose=verbose) [0;32m--> 168[0;31m for (uid, iid, r_ui_trans) in testset] [0m[1;32m 169[0m [0;32mreturn[0m [0mpredictions[0m[0;34m[0m[0;34m[0m[0m [1;32m 170[0m [0;34m[0m[0m [0;32m~/.local/lib/python3.7/site-packages/surprise/prediction_algorithms/algo_base.py[0m in [0;36mpredict[0;34m(self, uid, iid, r_ui, clip, verbose)[0m [1;32m 104[0m [0mdetails[0m [0;34m=[0m [0;34m{[0m[0;34m}[0m[0;34m[0m[0;34m[0m[0m [1;32m 105[0m [0;32mtry[0m[0;34m:[0m[0;34m[0m[0;34m[0m[0m [0;32m--> 106[0;31m [0mest[0m [0;34m=[0m [0mself[0m[0;34m.[0m[0mestimate[0m[0;34m([0m[0miuid[0m[0;34m,[0m [0miiid[0m[0;34m)[0m[0;34m[0m[0;34m[0m[0m [0m[1;32m 107[0m [0;34m[0m[0m [1;32m 108[0m [0;31m# If the details dict was also returned[0m[0;34m[0m[0;34m[0m[0;34m[0m[0m [0;32m~/.local/lib/python3.7/site-packages/surprise/prediction_algorithms/knns.py[0m in [0;36mestimate[0;34m(self, u, i)[0m [1;32m 109[0m [0;34m[0m[0m [1;32m 110[0m [0mneighbors[0m [0;34m=[0m [0;34m[[0m[0;34m([0m[0mself[0m[0;34m.[0m[0msim[0m[0;34m[[0m[0mx[0m[0;34m,[0m [0mx2[0m[0;34m][0m[0;34m,[0m [0mr[0m[0;34m)[0m [0;32mfor[0m [0;34m([0m[0mx2[0m[0;34m,[0m [0mr[0m[0;34m)[0m [0;32min[0m [0mself[0m[0;34m.[0m[0myr[0m[0;34m[[0m[0my[0m[0;34m][0m[0;34m][0m[0;34m[0m[0;34m[0m[0m [0;32m--> 111[0;31m [0mk_neighbors[0m [0;34m=[0m [0mheapq[0m[0;34m.[0m[0mnlargest[0m[0;34m([0m[0mself[0m[0;34m.[0m[0mk[0m[0;34m,[0m [0mneighbors[0m[0;34m,[0m [0mkey[0m[0;34m=[0m[0;32mlambda[0m [0mt[0m[0;34m:[0m [0mt[0m[0;34m[[0m[0;36m0[0m[0;34m][0m[0;34m)[0m[0;34m[0m[0;34m[0m[0m [0m[1;32m 112[0m [0;34m[0m[0m [1;32m 113[0m [0;31m# compute weighted average[0m[0;34m[0m[0;34m[0m[0;34m[0m[0m [0;32m/usr/lib/python3.7/heapq.py[0m in [0;36mnlargest[0;34m(n, iterable, key)[0m [1;32m 567[0m [0;31m# General case, slowest method[0m[0;34m[0m[0;34m[0m[0;34m[0m[0m [1;32m 568[0m [0mit[0m [0;34m=[0m [0miter[0m[0;34m([0m[0miterable[0m[0;34m)[0m[0;34m[0m[0;34m[0m[0m [0;32m--> 569[0;31m [0mresult[0m [0;34m=[0m [0;34m[[0m[0;34m([0m[0mkey[0m[0;34m([0m[0melem[0m[0;34m)[0m[0;34m,[0m [0mi[0m[0;34m,[0m [0melem[0m[0;34m)[0m [0;32mfor[0m [0mi[0m[0;34m,[0m [0melem[0m [0;32min[0m [0mzip[0m[0;34m([0m[0mrange[0m[0;34m([0m[0;36m0[0m[0;34m,[0m [0;34m-[0m[0mn[0m[0;34m,[0m [0;34m-[0m[0;36m1[0m[0;34m)[0m[0;34m,[0m [0mit[0m[0;34m)[0m[0;34m][0m[0;34m[0m[0;34m[0m[0m [0m[1;32m 570[0m [0;32mif[0m [0;32mnot[0m [0mresult[0m[0;34m:[0m[0;34m[0m[0;34m[0m[0m [1;32m 571[0m [0;32mreturn[0m [0mresult[0m[0;34m[0m[0;34m[0m[0m [0;32m/usr/lib/python3.7/heapq.py[0m in [0;36m<listcomp>[0;34m(.0)[0m [1;32m 567[0m [0;31m# General case, slowest method[0m[0;34m[0m[0;34m[0m[0;34m[0m[0m [1;32m 568[0m [0mit[0m [0;34m=[0m [0miter[0m[0;34m([0m[0miterable[0m[0;34m)[0m[0;34m[0m[0;34m[0m[0m [0;32m--> 569[0;31m [0mresult[0m [0;34m=[0m [0;34m[[0m[0;34m([0m[0mkey[0m[0;34m([0m[0melem[0m[0;34m)[0m[0;34m,[0m [0mi[0m[0;34m,[0m [0melem[0m[0;34m)[0m [0;32mfor[0m [0mi[0m[0;34m,[0m [0melem[0m [0;32min[0m [0mzip[0m[0;34m([0m[0mrange[0m[0;34m([0m[0;36m0[0m[0;34m,[0m [0;34m-[0m[0mn[0m[0;34m,[0m [0;34m-[0m[0;36m1[0m[0;34m)[0m[0;34m,[0m [0mit[0m[0;34m)[0m[0;34m][0m[0;34m[0m[0;34m[0m[0m [0m[1;32m 570[0m [0;32mif[0m [0;32mnot[0m [0mresult[0m[0;34m:[0m[0;34m[0m[0;34m[0m[0m [1;32m 571[0m [0;32mreturn[0m [0mresult[0m[0;34m[0m[0;34m[0m[0m [0;31mKeyboardInterrupt[0m:
I-KNN - on top baseline
sim_options = {
"name": "cosine",
"user_based": False,
} # compute similarities between items
algo = sp.KNNBaseline()
helpers.ready_made(
algo,
reco_path="Recommendations generated/ml-100k/Ready_I-KNNBaseline_reco.csv",
estimations_path="Recommendations generated/ml-100k/Ready_I-KNNBaseline_estimations.csv",
)
dir_path = "Recommendations generated/ml-100k/"
super_reactions = [4, 5]
test = pd.read_csv("./Datasets/ml-100k/test.csv", sep="\t", header=None)
ev.evaluate_all(test, dir_path, super_reactions)
project task 3: use a version of your choice of Surprise KNNalgorithm
# read the docs and try to find best parameter configuration (let say in terms of RMSE)
# https://surprise.readthedocs.io/en/stable/knn_inspired.html##surprise.prediction_algorithms.knns.KNNBaseline
# the solution here can be similar to examples above
# please save the output in 'Recommendations generated/ml-100k/Self_KNNSurprisetask_reco.csv' and
# 'Recommendations generated/ml-100k/Self_KNNSurprisetask_estimations.csv'
import helpers
import surprise as sp
import imp
import evaluation_measures as ev
sim_options = {
"name": "cosine",
"user_based": False,
} # compute similarities between items
algo = sp.KNNWithZScore(k=40, sim_options=sim_options)
helpers.ready_made(
algo,
reco_path='Recommendations generated/ml-100k/Ready_I-KNNWithZScore_reco.csv',
estimations_path='Recommendations generated/ml-100k/Ready_I-KNNWithZScore_estimations.csv')
Computing the cosine similarity matrix... Done computing similarity matrix. Generating predictions... Generating top N recommendations... Generating predictions...
dir_path="Recommendations generated/ml-100k/"
super_reactions=[4,5]
test=pd.read_csv('./Datasets/ml-100k/test.csv', sep='\t', header=None)
ev.evaluate_all(test, dir_path, super_reactions)
943it [00:00, 8503.18it/s] 943it [00:00, 8069.90it/s] 943it [00:00, 7330.46it/s] 943it [00:00, 8456.26it/s] 943it [00:00, 8289.09it/s] 943it [00:00, 8115.60it/s] 943it [00:00, 8452.48it/s] 943it [00:00, 8448.04it/s] 943it [00:00, 8171.91it/s] 943it [00:00, 7235.55it/s] 943it [00:00, 7667.03it/s] 943it [00:00, 7646.62it/s]
Model | RMSE | MAE | precision | recall | F_1 | F_05 | precision_super | recall_super | NDCG | mAP | MRR | LAUC | HR | H2R | Reco in test | Test coverage | Shannon | Gini | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | Self_TopPop | 2.508258 | 2.217909 | 0.188865 | 0.116919 | 0.118732 | 0.141584 | 0.130472 | 0.137473 | 0.214651 | 0.111707 | 0.400939 | 0.555546 | 0.765642 | 0.492047 | 1.000000 | 0.038961 | 3.159079 | 0.987317 |
0 | Ready_Baseline | 0.949459 | 0.752487 | 0.091410 | 0.037652 | 0.046030 | 0.061286 | 0.079614 | 0.056463 | 0.095957 | 0.043178 | 0.198193 | 0.515501 | 0.437964 | 0.239661 | 1.000000 | 0.033911 | 2.836513 | 0.991139 |
0 | Self_KNNSurprisetask | 0.946255 | 0.745209 | 0.083457 | 0.032848 | 0.041227 | 0.055493 | 0.074785 | 0.048890 | 0.089577 | 0.040902 | 0.189057 | 0.513076 | 0.417815 | 0.217391 | 0.888547 | 0.130592 | 3.611806 | 0.978659 |
0 | Self_GlobalAvg | 1.125760 | 0.943534 | 0.061188 | 0.025968 | 0.031383 | 0.041343 | 0.040558 | 0.032107 | 0.067695 | 0.027470 | 0.171187 | 0.509546 | 0.384942 | 0.142100 | 1.000000 | 0.025974 | 2.711772 | 0.992003 |
0 | Ready_Random | 1.528005 | 1.227604 | 0.042842 | 0.019173 | 0.022234 | 0.028926 | 0.026502 | 0.019532 | 0.044202 | 0.015665 | 0.107737 | 0.506081 | 0.313892 | 0.080594 | 0.986108 | 0.182540 | 5.094973 | 0.907749 |
0 | Ready_I-KNN | 1.030386 | 0.813067 | 0.026087 | 0.006908 | 0.010593 | 0.016046 | 0.021137 | 0.009522 | 0.024214 | 0.008958 | 0.048068 | 0.499885 | 0.154825 | 0.072110 | 0.402333 | 0.434343 | 5.133650 | 0.877999 |
0 | Ready_I-KNNWithZScore | 0.950328 | 0.745109 | 0.003924 | 0.001466 | 0.001953 | 0.002652 | 0.003433 | 0.001608 | 0.004968 | 0.002111 | 0.014694 | 0.497085 | 0.029692 | 0.006363 | 0.574019 | 0.065657 | 2.646787 | 0.991825 |
0 | Ready_I-KNNBaseline | 0.935327 | 0.737424 | 0.002545 | 0.000755 | 0.001105 | 0.001602 | 0.002253 | 0.000930 | 0.003444 | 0.001362 | 0.011760 | 0.496724 | 0.021209 | 0.004242 | 0.482821 | 0.059885 | 2.232578 | 0.994487 |
0 | Ready_U-KNN | 1.023495 | 0.807913 | 0.000742 | 0.000205 | 0.000305 | 0.000449 | 0.000536 | 0.000198 | 0.000845 | 0.000274 | 0.002744 | 0.496441 | 0.007423 | 0.000000 | 0.602121 | 0.010823 | 2.089186 | 0.995706 |
0 | Self_TopRated | 1.030712 | 0.820904 | 0.000954 | 0.000188 | 0.000298 | 0.000481 | 0.000644 | 0.000223 | 0.001043 | 0.000335 | 0.003348 | 0.496433 | 0.009544 | 0.000000 | 0.699046 | 0.005051 | 1.945910 | 0.995669 |
0 | Self_BaselineUI | 0.967585 | 0.762740 | 0.000954 | 0.000170 | 0.000278 | 0.000463 | 0.000644 | 0.000189 | 0.000752 | 0.000168 | 0.001677 | 0.496424 | 0.009544 | 0.000000 | 0.600530 | 0.005051 | 1.803126 | 0.996380 |
0 | Self_IKNN | 1.018363 | 0.808793 | 0.000318 | 0.000108 | 0.000140 | 0.000189 | 0.000000 | 0.000000 | 0.000214 | 0.000037 | 0.000368 | 0.496391 | 0.003181 | 0.000000 | 0.392153 | 0.115440 | 4.174741 | 0.965327 |