We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
你好,如何获得.ent_feature和.rel_feature呢,GRU4RecKG需要这些文件,文件内容是什么格式呢?如何获取?
The text was updated successfully, but these errors were encountered:
@zhaijianyang 您好,.ent_feature 和 .rel_feature 是存储预训练知识图谱向量的文件,一般会采用 TransE 等方法得到知识图谱每个实体 entity 的向量表征 entity_embedding 以及关系 relation 的向量表征 relation_embedding,然后将每个实体/关系对应的表征导出并存储。
.ent_feature
.rel_feature
entity_embedding
relation_embedding
对于知识图谱特征文件的获取方式,可以根据自身需求并参考知识图谱表示的论文编写代码,通过训练得到对应的特征表示;也可以借用 graphvite、LibKGE、AmpliGraph 等开源库来生成结果。
对于这种额外的原子文件,可以通过文档中的 Additional Atomic Files 相关提示来导入:
Firstly, prepare your additional atomic file (e.g. ml-1m.ent). ent_id:token ent_emb:float_seq m.0gs6m -115.08 13.60 113.69 m.01b195 -130.97 263.05 -129.88 Secondly, update the args as: .. code:: yaml additional_feat_suffix: [ent] load_col: # inter/user/item/...: As usual ent: [ent_id, ent_emb] Then, this additional atomic file will be loaded into the :class:Dataset object. These new features can be used as following. .. code:: python dataset = create_dataset(config) print(dataset.ent_feat)
Firstly, prepare your additional atomic file (e.g. ml-1m.ent).
ml-1m.ent
Secondly, update the args as:
.. code:: yaml
additional_feat_suffix: [ent] load_col: # inter/user/item/...: As usual ent: [ent_id, ent_emb]
Then, this additional atomic file will be loaded into the :class:Dataset object. These new features can be used as following.
Dataset
.. code:: python
dataset = create_dataset(config) print(dataset.ent_feat)
Sorry, something went wrong.
Sherry-XLL
No branches or pull requests
你好,如何获得.ent_feature和.rel_feature呢,GRU4RecKG需要这些文件,文件内容是什么格式呢?如何获取?
The text was updated successfully, but these errors were encountered: