注意到 warm subset splitting 部分将训练数据直接随机划分到训练集/验证集/测试集
n_warm_val = int(args.warm_split[1] * len(warm_idx))
n_warm_test = int(args.warm_split[2] * len(warm_idx))
n_warm_train = len(warm_idx) - n_warm_val - n_warm_test
np.random.shuffle(warm_idx)
warm_train_idx = warm_idx[:n_warm_train]
warm_val_idx = warm_idx[n_warm_train:n_warm_train + n_warm_val]
warm_test_idx = warm_idx[-n_warm_test:]
org_warm_train_len = len(warm_train_idx)
这是否会放大流行度较高的用户的重要性(计算 Recall, NDCG 等指标时)
作者是否考虑参考 RecBole 的实现,即先按用户分组,再进行划分
if split_mode == "RS":
if not isinstance(split_args["RS"], list):
raise ValueError(f'The value of "RS" [{split_args}] should be a list.')
if group_by is None or group_by.lower() == "none":
datasets = self.split_by_ratio(split_args["RS"], group_by=None)
elif group_by == "user":
datasets = self.split_by_ratio(
split_args["RS"], group_by=self.uid_field
)
else:
raise NotImplementedError(
f"The grouping method [{group_by}] has not been implemented."
)
注意到 warm subset splitting 部分将训练数据直接随机划分到训练集/验证集/测试集
这是否会放大流行度较高的用户的重要性(计算 Recall, NDCG 等指标时)
作者是否考虑参考 RecBole 的实现,即先按用户分组,再进行划分