Code Monkey home page Code Monkey logo

tf-ffm's Introduction

tf-FFM

Tensorflow based field-aware factorization machine, FFM.

Usage

from config import config
from dataset import Dataset
from ffm import FFM

ffm = FFM(config)
tr_filename = "data/criteo.tr.r100.gbdt0.ffm"
va_filename = "data/criteo.va.r100.gbdt0.ffm"
dataset = Dataset(tr_filename, va_filename, config.batch_size, config.shuffle)
ffm.train(dataset)

Result

=> Config Settings <=
Learning rate: 0.001
L2 normalization: 5e-05
Batch size: 1024
Embedding size: 4
Total epoch: 20
=> Config Settings <=
=> [INFO] Load and parse raw data from data/criteo.tr.r100.gbdt0.ffm ... <=
=> [INFO] Load and parse raw data from data/criteo.va.r100.gbdt0.ffm ... <=
=> [INFO] Process 100% in Epoch 1: [Train] log-loss: 0.46042 one iter 0.2 sec <=
=> [INFO] STEP 1, [Val] val_loss: 0.47963, val_auc: 0.770 one epoch in 70.9 sec <=
=> [INFO] Process 100% in Epoch 2: [Train] log-loss: 0.45366 one iter 0.2 sec <=
=> [INFO] STEP 2, [Val] val_loss: 0.47581, val_auc: 0.775 one epoch in 71.0 sec <=
=> [INFO] Process 100% in Epoch 3: [Train] log-loss: 0.42570 one iter 0.2 sec <=
=> [INFO] STEP 3, [Val] val_loss: 0.47484, val_auc: 0.776 one epoch in 71.0 sec <=
=> [INFO] Process 100% in Epoch 4: [Train] log-loss: 0.45457 one iter 0.2 sec <=
=> [INFO] STEP 4, [Val] val_loss: 0.47581, val_auc: 0.775 one epoch in 71.2 sec <=

tf-ffm's People

Contributors

ryanwangzf avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.