提交 7b83fa40 编写于 作者: W wangmeng28

Update doc for deepfm

上级 8a1af03e
# Deep Factorization Machines (DeepFM) for Click-Through Rate prediction # Deep Factorization Machine for Click-Through Rate prediction
## Introduction ## Introduction
This model implements the DeepFM proposed in the following paper: This model implements the DeepFM proposed in the following paper:
```text ```text
Huifeng Guo, Ruiming Tang, Yunming Ye, Zhenguo Li and Xiuqiang He. DeepFM: Huifeng Guo, Ruiming Tang, Yunming Ye, Zhenguo Li and Xiuqiang He. DeepFM:
A Factorization-Machine based Neural Network for CTR Prediction. A Factorization-Machine based Neural Network for CTR Prediction. Proceedings
Proceedings of the Twenty-Sixth International Joint Conference on of the Twenty-Sixth International Joint Conference on Artificial Intelligence
Artificial Intelligence (IJCAI-17), 2017 (IJCAI-17), 2017
``` ```
The DeepFm combines factorization machines 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 both low order and high order feature interactions. For details of the
factorization machines, please refer to the paper [factorization factorization machines, please refer to the paper [factorization
machines](https://www.csie.ntu.edu.tw/~b97053/paper/Rendle2010FM.pdf) machines](https://www.csie.ntu.edu.tw/~b97053/paper/Rendle2010FM.pdf)
...@@ -48,7 +48,7 @@ def fm_layer(input, factor_size): ...@@ -48,7 +48,7 @@ def fm_layer(input, factor_size):
second_order = paddle.layer.factorization_machine(input=input, factor_size=factor_size) second_order = paddle.layer.factorization_machine(input=input, factor_size=factor_size)
fm = paddle.layer.addto(input=[first_order, second_order], fm = paddle.layer.addto(input=[first_order, second_order],
act=paddle.activation.Linear(), act=paddle.activation.Linear(),
ias_attr=False) bias_attr=False)
return fm return fm
``` ```
...@@ -73,8 +73,6 @@ python train.py \ ...@@ -73,8 +73,6 @@ python train.py \
2>&1 | train.log 2>&1 | train.log
``` ```
## Evaluate
After training pass 9 batch 40000, the testing AUC is `0.807178` and the testing After training pass 9 batch 40000, the testing AUC is `0.807178` and the testing
cost is `0.445196`. cost is `0.445196`.
......
...@@ -15,22 +15,22 @@ def parse_args(): ...@@ -15,22 +15,22 @@ def parse_args():
'--model_gz_path', '--model_gz_path',
type=str, type=str,
required=True, required=True,
help="path of model parameters gz file") help="The path of model parameters gz file")
parser.add_argument( parser.add_argument(
'--data_path', '--data_path',
type=str, type=str,
required=True, required=True,
help="path of the dataset to infer") help="The path of the dataset to infer")
parser.add_argument( parser.add_argument(
'--prediction_output_path', '--prediction_output_path',
type=str, type=str,
required=True, required=True,
help="path to output the prediction") help="The path to output the prediction")
parser.add_argument( parser.add_argument(
'--factor_size', '--factor_size',
type=int, type=int,
default=10, default=10,
help="the factor size for the factorization machine (default:10)") help="The factor size for the factorization machine (default:10)")
return parser.parse_args() return parser.parse_args()
......
...@@ -19,32 +19,32 @@ def parse_args(): ...@@ -19,32 +19,32 @@ def parse_args():
'--train_data_path', '--train_data_path',
type=str, type=str,
required=True, required=True,
help="path of training dataset") help="The path of training dataset")
parser.add_argument( parser.add_argument(
'--test_data_path', '--test_data_path',
type=str, type=str,
required=True, required=True,
help="path of testing dataset") help="The path of testing dataset")
parser.add_argument( parser.add_argument(
'--batch_size', '--batch_size',
type=int, type=int,
default=1000, default=1000,
help="size of mini-batch (default:1000)") help="The size of mini-batch (default:1000)")
parser.add_argument( parser.add_argument(
'--num_passes', '--num_passes',
type=int, type=int,
default=10, default=10,
help="number of passes to train (default: 10)") help="The number of passes to train (default: 10)")
parser.add_argument( parser.add_argument(
'--factor_size', '--factor_size',
type=int, type=int,
default=10, default=10,
help="the factor size for the factorization machine (default:10)") help="The factor size for the factorization machine (default:10)")
parser.add_argument( parser.add_argument(
'--model_output_dir', '--model_output_dir',
type=str, type=str,
default='models', default='models',
help='path for model to store (default: models)') help='The path for model to store (default: models)')
return parser.parse_args() return parser.parse_args()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册