File tree Expand file tree Collapse file tree 18 files changed +1215
-3
lines changed Expand file tree Collapse file tree 18 files changed +1215
-3
lines changed Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ python -u tools/static_trainer.py -m models/rank/dnn/config.yaml # 静态图训
172172 | 排序 | [ DCN_V2] ( models/rank/dcn_v2/ ) | - | ✓ | ✓ | >=2.1.0 | [ WWW 2021] [ DCN V2: Improved Deep & Cross Network and Practical Lessons for Web-scale Learning to Rank Systems ] (https://arxiv.org/pdf/2008.13535v2.pdf) |
173173 | 排序 | [ DSIN] ( models/rank/dsin/ ) | - | ✓ | ✓ | >=2.1.0 | [ IJCAI 2019] [ Deep Session Interest Network for Click-Through Rate Prediction ] (https://arxiv.org/pdf/1905.06482v1.pdf) |
174174 | 排序 | [ SIGN] ( models/rank/sign/ ) ([ 文档] ( https://paddl7erec.readthedocs.io/en/latest/models/rank/sign.html ) ) | [ Python CPU/GPU] ( https://aistudio.baidu.com/aistudio/projectdetail/3869111 ) | ✓ | ✓ | >=2.1.0 | [ AAAI 2021] [ Detecting Beneficial Feature Interactions for Recommender Systems ] (https://arxiv.org/pdf/2008.00404v6.pdf) |
175- | 多任务 | [ AITM] ( models/rank/aitm/ ) | - | ✓ | ✓ | >=2.1.0 | [ KDD 2021] [ Modeling the Sequential Dependence among Audience Multi-step Conversions with Multi-task Learning in Targeted Display Advertising ] (https://arxiv.org/pdf/2105.08489v2.pdf) |
175+ | 排序 | [ IPRec ] ( models/rank/iprec/ ) ( [ 文档 ] ( https://paddl7erec.readthedocs.io/en/latest/models/rank/iprec.html ) ) | - | ✓ | ✓ | >=2.1.0 | [ SIGIR 2021 ] [ Package Recommendation with Intra- and Inter-Package Attention Networks ] ( http://nlp.csai.tsinghua.edu.cn/~xrb/publications/SIGIR-21_IPRec.pdf) | 多任务 | [ AITM] ( models/rank/aitm/ ) | - | ✓ | ✓ | >=2.1.0 | [ KDD 2021] [ Modeling the Sequential Dependence among Audience Multi-step Conversions with Multi-task Learning in Targeted Display Advertising ] (https://arxiv.org/pdf/2105.08489v2.pdf) |
176176 | 多任务 | [ PLE] ( models/multitask/ple/ ) ([ 文档] ( https://paddlerec.readthedocs.io/en/latest/models/multitask/ple.html ) ) | [ Python CPU/GPU] ( https://aistudio.baidu.com/aistudio/projectdetail/3238938 ) | ✓ | ✓ | >=2.1.0 | [ RecSys 2020] [ Progressive Layered Extraction (PLE): A Novel Multi-Task Learning (MTL) Model for Personalized Recommendations ] (https://dl.acm.org/doi/abs/10.1145/3383313.3412236) |
177177 | 多任务 | [ ESMM] ( models/multitask/esmm/ ) ([ 文档] ( https://paddlerec.readthedocs.io/en/latest/models/multitask/esmm.html ) ) | [ Python CPU/GPU] ( https://aistudio.baidu.com/aistudio/projectdetail/3238583 ) | ✓ | ✓ | >=2.1.0 | [ SIGIR 2018] [ Entire Space Multi-Task Model: An Effective Approach for Estimating Post-Click Conversion Rate ] (https://arxiv.org/abs/1804.07931) |
178178 | 多任务 | [ MMOE] ( models/multitask/mmoe/ ) ([ 文档] ( https://paddlerec.readthedocs.io/en/latest/models/multitask/mmoe.html ) ) | [ Python CPU/GPU] ( https://aistudio.baidu.com/aistudio/projectdetail/3238934 ) | ✓ | ✓ | >=2.1.0 | [ KDD 2018] [ Modeling Task Relationships in Multi-task Learning with Multi-gate Mixture-of-Experts ] (https://dl.acm.org/doi/abs/10.1145/3219819.3220007) |
Original file line number Diff line number Diff line change @@ -163,6 +163,7 @@ python -u tools/static_trainer.py -m models/rank/dnn/config.yaml # Training wit
163163 | Rank | [ DCN_V2] ( models/rank/dcn_v2/ ) | - | ✓ | ✓ | >=2.1.0 | [ WWW 2021] [ DCN V2: Improved Deep & Cross Network and Practical Lessons for Web-scale Learning to Rank Systems ] (https://arxiv.org/pdf/2008.13535v2.pdf) |
164164 | Rank | [ DSIN] ( models/rank/dsin/ ) | - | ✓ | ✓ | >=2.1.0 | [ IJCAI 2019] [ Deep Session Interest Network for Click-Through Rate Prediction ] (https://arxiv.org/pdf/1905.06482v1.pdf) |
165165 | Rank | [ SIGN] ( models/rank/sign/ ) ([ doc] ( https://paddlerec.readthedocs.io/en/latest/models/rank/sign.html ) ) | [ Python CPU/GPU] ( https://aistudio.baidu.com/aistudio/projectdetail/3869111 ) | ✓ | ✓ | >=2.1.0 | [ AAAI 2021] [ Detecting Beneficial Feature Interactions for Recommender Systems ] (https://arxiv.org/pdf/2008.00404v6.pdf) |
166+ | Rank | [ IPRec] ( models/rank/iprec/ ) ([ doc] ( https://paddl7erec.readthedocs.io/en/latest/models/rank/iprec.html ) ) | - | ✓ | ✓ | >=2.1.0 | [ SIGIR 2021] [ Package Recommendation with Intra- and Inter-Package Attention Networks ] (http://nlp.csai.tsinghua.edu.cn/~xrb/publications/SIGIR-21_IPRec.pdf) |
166167 | Multi-Task | [ AITM] ( models/rank/aitm/ ) | - | ✓ | ✓ | >=2.1.0 | [ KDD 2021] [ Modeling the Sequential Dependence among Audience Multi-step Conversions with Multi-task Learning in Targeted Display Advertising ] (https://arxiv.org/pdf/2105.08489v2.pdf) |
167168 | Multi-Task | [ PLE] ( models/multitask/ple/ ) <br >([ doc] ( https://paddlerec.readthedocs.io/en/latest/models/multitask/ple.html ) ) | [ Python CPU/GPU] ( https://aistudio.baidu.com/aistudio/projectdetail/3238938 ) | ✓ | ✓ | >=2.1.0 | [ RecSys 2020] [ Progressive Layered Extraction (PLE): A Novel Multi-Task Learning (MTL) Model for Personalized Recommendations ] (https://dl.acm.org/doi/abs/10.1145/3383313.3412236) |
168169 | Multi-Task | [ ESMM] ( models/multitask/esmm/ ) <br >([ doc] ( https://paddlerec.readthedocs.io/en/latest/models/multitask/esmm.html ) ) | [ Python CPU/GPU] ( https://aistudio.baidu.com/aistudio/projectdetail/3238583 ) | ✓ | ✓ | >=2.1.0 | [ SIGIR 2018] [ Entire Space Multi-Task Model: An Effective Approach for Estimating Post-Click Conversion Rate ] (https://arxiv.org/abs/1804.07931) |
Original file line number Diff line number Diff line change 1+ mkdir whole_data
2+ mkdir whole_data/train && mkdir whole_data/test
3+ wget https://paddlerec.bj.bcebos.com/datasets/IPREC/3_days.zip
4+ unzip 3_days.zip
5+ mv train.jsonl whole_data/train
6+ mv test.jsonl whole_data/test
Original file line number Diff line number Diff line change 1+ # iprec模型
2+ 代码请参考:[ AITM] ( https://github.com/PaddlePaddle/PaddleRec/tree/master/models/rank/iprec )
3+ 如果我们的代码对您有用,还请点个star啊~
4+ 注:在阅读该示例前,建议您先了解以下内容:
5+
6+ [ paddlerec入门教程] ( https://github.com/PaddlePaddle/PaddleRec/blob/master/README.md )
7+
8+ ## 内容
9+
10+ - [ 模型简介] ( #模型简介 )
11+ - [ 数据准备] ( #数据准备 )
12+ - [ 运行环境] ( #运行环境 )
13+ - [ 快速开始] ( #快速开始 )
14+ - [ 模型组网] ( #模型组网 )
15+ - [ 效果复现] ( #效果复现 )
16+ - [ 进阶使用] ( #进阶使用 )
17+ - [ FAQ] ( #FAQ )
18+
19+ ## 模型简介
20+ Package Recommendation with Intra- and Inter-Package Attention Networks 《利用“包内”和“包间”注意力网络的包推荐》。
21+ 随着移动互联网中在线社交网络的蓬勃发展,我们提出了一个新颖的社交推荐场景,名为Package Recommendation。在这种场景中,用户不再被推荐单个项目或项目列表,而是被推荐异构且类型多样对象的组合(称为包,例如,包括新闻、媒体和观看新闻的朋友)。与传统推荐不同,在包推荐中,包中的对象被明确显示给用户,用户会对显式展示的对象表现出极大的兴趣,反过来这些对象可能对用户行为产生重大影响,并显著改变传统的推荐模式。
22+
23+ ## 数据准备
24+ 训练及测试数据集选自时间窗口为3天的微信公众号的用户日志,按7:1:2划分训练集、验证集、测试集
25+ 在模型目录的data目录下为您准备了快速运行的示例数据,若需要使用全量数据可以参考下方效果复现部分。
26+ ## 运行环境
27+ PaddlePaddle>=2.0
28+
29+ python 2.7/3.5/3.6/3.7
30+
31+ os : windows/linux/macos
32+
33+ ## 快速开始
34+ 本文提供了样例数据可以供您快速体验,在任意目录下均可执行。在iprec模型目录的快速执行命令如下:
35+ ``` bash
36+ # 进入模型目录
37+ # cd models/rank/iprec # 在任意目录均可运行
38+ # 动态图训练
39+ python -u ../../../tools/trainer.py -m config.yaml # 全量数据运行config_bigdata.yaml
40+ # 动态图预测
41+ python -u ../../../tools/infer.py -m config.yaml
42+ ```
43+ ## 模型组网
44+ 模型整体结构如下:
45+
46+ <img align =" center " src =" ../../../imgs/iprec.png " >
47+
48+ ## 效果复现
49+ 为了方便使用者能够快速的跑通每一个模型,我们在每个模型下都提供了样例数据。如果需要复现readme中的效果,请按如下步骤依次操作即可。
50+ 在全量数据下模型的指标如下:
51+
52+ | 模型 | auc | batch_size | epoch_num| Time of each epoch |
53+ | :------| :-------| :------ | :------| :------ |
54+ | iprec | 0.6934 | 256 | 1 | 3600s |
55+
56+ 1 . 确认您当前所在目录为PaddleRec/models/rank/iprec
57+ 2 . 进入Paddlerec/datasets/iprec
58+
59+ ``` bash
60+ cd ../../../datasets/iprec
61+ sh run.sh
62+ ```
63+ 3 . 切回模型目录,执行命令运行全量数据
64+
65+ ``` bash
66+ cd - # 切回模型目录
67+ python -u ../../../tools/trainer.py -m config_bigdata.yaml
68+ python -u ../../../tools/infer.py -m config_bigdata.yaml
69+ ```
70+
71+ ## 进阶使用
72+
73+ ## FAQ
Original file line number Diff line number Diff line change 5050[ autofis] ( https://paddlerec.readthedocs.io/en/latest/models/rank/autofis.html )
5151[ aitm] ( https://paddlerec.readthedocs.io/en/latest/models/rank/aitm.html )
5252[ dsin] ( https://paddlerec.readthedocs.io/en/latest/models/rank/dsin.html )
53- [ sign] ( https://paddlerec.readthedocs.io/en/latest/models/rank/sign.html )
53+ [ sign] ( https://paddlerec.readthedocs.io/en/latest/models/rank/sign.html )
54+ [ iprec] ( https://paddlerec.readthedocs.io/en/latest/models/rank/iprec.html )
Original file line number Diff line number Diff line change 1+ # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # http://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+
15+ runner :
16+ train_data_dir : " ./data/sample_data/train"
17+ train_reader_path : " reader" # importlib format
18+ train_batch_size : 5
19+ model_save_path : " output_model_iprec"
20+ use_auc : True
21+ use_gpu : False
22+ epochs : 1
23+ print_interval : 1
24+ test_data_dir : " ./data/sample_data/test"
25+ infer_reader_path : " reader" # importlib format
26+ infer_batch_size : 5
27+ infer_load_path : " output_model_iprec"
28+ infer_start_epoch : 0
29+ infer_end_epoch : 1
30+
31+ hyper_parameters :
32+ optimizer :
33+ class : adam
34+ learning_rate : 0.0001
35+ num_users : 554237
36+ num_items : 344087
37+ num_bizs : 166465
38+ hidden_units : 64
39+ f_max_len : 20
40+ k : 4
41+ u_max_i : 99
42+ u_max_f : 220
43+ u_max_pack : 50
44+ pack_max_nei_b : 20
45+ pack_max_nei_f : 20
46+ dropout_rate : 0.4
Original file line number Diff line number Diff line change 1+ # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # http://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+
15+ runner :
16+ train_data_dir : " ../../../datasets/iprec/whole_data/train"
17+ train_reader_path : " reader" # importlib format
18+ train_batch_size : 256
19+ model_save_path : " output_model_iprec_all"
20+ use_auc : True
21+ use_gpu : True
22+ epochs : 5
23+ print_interval : 500
24+
25+ test_data_dir : " ../../../datasets/iprec/whole_data/test"
26+ infer_reader_path : " reader" # importlib format
27+ infer_batch_size : 256
28+ infer_load_path : " output_model_iprec_all"
29+ infer_start_epoch : 0
30+ infer_end_epoch : 5
31+
32+ hyper_parameters :
33+ optimizer :
34+ class : adam
35+ learning_rate : 0.0001
36+ num_users : 554237
37+ num_items : 344087
38+ num_bizs : 166465
39+ hidden_units : 64
40+ f_max_len : 20
41+ k : 4
42+ u_max_i : 99
43+ u_max_f : 220
44+ u_max_pack : 50
45+ pack_max_nei_b : 20
46+ pack_max_nei_f : 20
47+ dropout_rate : 0.4
You can’t perform that action at this time.
0 commit comments