Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

我想请教一个ml-1m知识图谱数据集的配置信息问题 #2047

Open
yunshanlucky opened this issue May 14, 2024 · 1 comment
Open
Assignees
Labels
enhancement New feature or request

Comments

@yunshanlucky
Copy link

数据集配置文件中:
entity_kg_num_interval: "[5,inf)"
relation_kg_num_interval: "[5,inf)"
这两个参数修改有什么作用,我尝试修改这两个参数,却并没有发现对数据集和实验有任何影响,感谢回答!

知识图谱数据配置信息如下:

dataset config

field_separator: "\t"
seq_separator: " "
USER_ID_FIELD: user_id
ITEM_ID_FIELD: item_id
RATING_FIELD: rating
HEAD_ENTITY_ID_FIELD: head_id
TAIL_ENTITY_ID_FIELD: tail_id
RELATION_ID_FIELD: relation_id
ENTITY_ID_FIELD: entity_id
NEG_PREFIX: neg_
LABEL_FIELD: label
load_col:
inter: [user_id, item_id, rating]
kg: [head_id, relation_id, tail_id]
link: [item_id, entity_id]

data filtering for interactions

val_interval:
rating: "[3,inf)"
unused_col:
inter: [rating]

user_inter_num_interval: "[10,inf)"
item_inter_num_interval: "[10,inf)"

data preprocessing for knowledge graph triples

kg_reverse_r: True
entity_kg_num_interval: "[5,inf)"
relation_kg_num_interval: "[5,inf)"

training and evaluation

epochs: 500
train_batch_size: 4096
eval_batch_size: 40960000
valid_metric: NDCG@10
train_neg_sample_args:
distribution: uniform
sample_num: 1
dynamic: False

@yunshanlucky yunshanlucky added the enhancement New feature or request label May 14, 2024
@xderui
Copy link

xderui commented May 14, 2024

这个参数应该类似于user_inter_num_intervalitem_inter_num_interval,用来过滤掉 度(节点,实体) 或者 数量(边,关系) 不在这个区间内的点或边。

你修改的应该是sample.yaml里的entity_kg_num_intervalrelation_kg_num_interval,但sample.yaml里的kg参数好像不起作用,实际起作用的是./recbole/properties/quick_start_config/knowledge_base.yaml里的参数,可以尝试一下~
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants