毕业设计:基于图神经网络的异构图表示学习和推荐算法研究
GNN-Recommendation/
gnnrec/ 算法模块顶级包
hge/ 异构图表示学习模块
kgrec/ 基于图神经网络的推荐算法模块
data/ 数据集目录(已添加.gitignore)
model/ 模型保存目录(已添加.gitignore)
img/ 图片目录
academic_graph/ Django项目模块
rank/ Django应用
manage.py Django管理脚本
Python 3.7
pip install -r requirements_cuda.txt
pip install -r requirements.txt
基于对比学习的关系感知异构图神经网络(Relation-aware Heterogeneous Graph Neural Network with Contrastive Learning, RHCO)
见 readme
基于图神经网络的学术推荐算法(Graph Neural Network based Academic Recommendation Algorithm, GARec)
见 readme
- 创建数据库及用户
CREATE DATABASE academic_graph CHARACTER SET utf8mb4;
CREATE USER 'academic_graph'@'%' IDENTIFIED BY 'password';
GRANT ALL ON academic_graph.* TO 'academic_graph'@'%';
- 在根目录下创建文件.mylogin.cnf
[client]
host = x.x.x.x
port = 3306
user = username
password = password
database = database
default-character-set = utf8mb4
- 创建数据库表
python manage.py makemigrations --settings=academic_graph.settings.prod rank
python manage.py migrate --settings=academic_graph.settings.prod
- 导入oag-cs数据集
python manage.py loadoagcs --settings=academic_graph.settings.prod
注:由于导入一次时间很长(约9小时),为了避免中途发生错误,可以先用data/oag/test中的测试数据调试一下
python manage.py collectstatic --settings=academic_graph.settings.prod
export SECRET_KEY=xxx
python manage.py runserver --settings=academic_graph.settings.prod 0.0.0.0:8000