Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
models
提交
7b83fa40
M
models
项目概览
PaddlePaddle
/
models
大约 1 年 前同步成功
通知
222
Star
6828
Fork
2962
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
602
列表
看板
标记
里程碑
合并请求
255
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
models
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
602
Issue
602
列表
看板
标记
里程碑
合并请求
255
合并请求
255
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
7b83fa40
编写于
11月 27, 2017
作者:
W
wangmeng28
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update doc for deepfm
上级
8a1af03e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
17 addition
and
19 deletion
+17
-19
deep_fm/README.md
deep_fm/README.md
+7
-9
deep_fm/infer.py
deep_fm/infer.py
+4
-4
deep_fm/train.py
deep_fm/train.py
+6
-6
未找到文件。
deep_fm/README.md
浏览文件 @
7b83fa40
# Deep Factorization Machine
s (DeepFM)
for Click-Through Rate prediction
# Deep Factorization Machine for Click-Through Rate prediction
## Introduction
This model implements the DeepFM proposed in the following paper:
```
text
Huifeng Guo, Ruiming Tang, Yunming Ye, Zhenguo Li and Xiuqiang He. DeepFM:
A Factorization-Machine based Neural Network for CTR Prediction.
Proceedings of the Twenty-Sixth International Joint Conference on
Artificial Intelligence
(IJCAI-17), 2017
Huifeng Guo, Ruiming Tang, Yunming Ye, Zhenguo Li and Xiuqiang He. DeepFM:
A Factorization-Machine based Neural Network for CTR Prediction. Proceedings
of the Twenty-Sixth International Joint Conference on Artificial Intelligence
(IJCAI-17), 2017
```
The DeepFm combines factorization machine
s
and deep neural networks to model
The DeepFm combines factorization machine and deep neural networks to model
both low order and high order feature interactions. For details of the
factorization machines, please refer to the paper
[
factorization
machines
](
https://www.csie.ntu.edu.tw/~b97053/paper/Rendle2010FM.pdf
)
...
...
@@ -48,7 +48,7 @@ def fm_layer(input, factor_size):
second_order
=
paddle
.
layer
.
factorization_machine
(
input
=
input
,
factor_size
=
factor_size
)
fm
=
paddle
.
layer
.
addto
(
input
=
[
first_order
,
second_order
],
act
=
paddle
.
activation
.
Linear
(),
ias_attr
=
False
)
b
ias_attr
=
False
)
return
fm
```
...
...
@@ -73,8 +73,6 @@ python train.py \
2>&1 | train.log
```
## Evaluate
After training pass 9 batch 40000, the testing AUC is
`0.807178`
and the testing
cost is
`0.445196`
.
...
...
deep_fm/infer.py
浏览文件 @
7b83fa40
...
...
@@ -15,22 +15,22 @@ def parse_args():
'--model_gz_path'
,
type
=
str
,
required
=
True
,
help
=
"path of model parameters gz file"
)
help
=
"
The
path of model parameters gz file"
)
parser
.
add_argument
(
'--data_path'
,
type
=
str
,
required
=
True
,
help
=
"path of the dataset to infer"
)
help
=
"
The
path of the dataset to infer"
)
parser
.
add_argument
(
'--prediction_output_path'
,
type
=
str
,
required
=
True
,
help
=
"path to output the prediction"
)
help
=
"
The
path to output the prediction"
)
parser
.
add_argument
(
'--factor_size'
,
type
=
int
,
default
=
10
,
help
=
"
t
he factor size for the factorization machine (default:10)"
)
help
=
"
T
he factor size for the factorization machine (default:10)"
)
return
parser
.
parse_args
()
...
...
deep_fm/train.py
浏览文件 @
7b83fa40
...
...
@@ -19,32 +19,32 @@ def parse_args():
'--train_data_path'
,
type
=
str
,
required
=
True
,
help
=
"path of training dataset"
)
help
=
"
The
path of training dataset"
)
parser
.
add_argument
(
'--test_data_path'
,
type
=
str
,
required
=
True
,
help
=
"path of testing dataset"
)
help
=
"
The
path of testing dataset"
)
parser
.
add_argument
(
'--batch_size'
,
type
=
int
,
default
=
1000
,
help
=
"size of mini-batch (default:1000)"
)
help
=
"
The
size of mini-batch (default:1000)"
)
parser
.
add_argument
(
'--num_passes'
,
type
=
int
,
default
=
10
,
help
=
"number of passes to train (default: 10)"
)
help
=
"
The
number of passes to train (default: 10)"
)
parser
.
add_argument
(
'--factor_size'
,
type
=
int
,
default
=
10
,
help
=
"
t
he factor size for the factorization machine (default:10)"
)
help
=
"
T
he factor size for the factorization machine (default:10)"
)
parser
.
add_argument
(
'--model_output_dir'
,
type
=
str
,
default
=
'models'
,
help
=
'path for model to store (default: models)'
)
help
=
'
The
path for model to store (default: models)'
)
return
parser
.
parse_args
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录