From 7b83fa40982a77a7c3c8cc390047f9b3a796a26d Mon Sep 17 00:00:00 2001 From: wangmeng28 Date: Mon, 27 Nov 2017 19:24:29 +0800 Subject: [PATCH] Update doc for deepfm --- deep_fm/README.md | 16 +++++++--------- deep_fm/infer.py | 8 ++++---- deep_fm/train.py | 12 ++++++------ 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/deep_fm/README.md b/deep_fm/README.md index dfd15d44..ea6e6f1e 100644 --- a/deep_fm/README.md +++ b/deep_fm/README.md @@ -1,16 +1,16 @@ -# Deep Factorization Machines (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 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 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) + bias_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`. diff --git a/deep_fm/infer.py b/deep_fm/infer.py index 63c096cd..40a59297 100755 --- a/deep_fm/infer.py +++ b/deep_fm/infer.py @@ -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="the factor size for the factorization machine (default:10)") + help="The factor size for the factorization machine (default:10)") return parser.parse_args() diff --git a/deep_fm/train.py b/deep_fm/train.py index 6f788999..0d2e79d6 100755 --- a/deep_fm/train.py +++ b/deep_fm/train.py @@ -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="the factor size for the factorization machine (default:10)") + help="The 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() -- GitLab