This is the code to implement the algorithm of FM^2 (Field-matrixed Factorization Machines), it can run a quick benchmark among the LR, FM, FFM, FwFM, FvFM, FmFM and DCN, it also support data process and feature extraction from public data set Criteo and Avazu.
First you will need to have TensorFlow (v1.15 with a GPU is preferred) and numpy, pandas, pickle and tqdm installed.
You may need to login and download the Criteo and Avazu from their websites respectively.
The unzipped raw data files should be placed at folder data/criteo/
and data/avazu/
respectively.
This project has the following content
- train.py The main function to train the model
- features.py Functions to process the data file and generate features
- models.py The core functions to describe those models, include the new proposed FmFM and FvFM, as well as other baseline models like LR, FM, FFM, FwFM
The folder bash contains individual training task with hyper-parameters, and the start_train.sh can schedule multiple task in one bash file.
Please refer to the contributing.md file for information about how to get involved. We welcome issues, questions, and pull requests.
Yang Sun, yang.sun@verizonmedia.com
This project is licensed under the terms of the MIT open source license. Please refer to LICENSE for the full terms.