All Projects → geffy → Tffm

geffy / Tffm

Licence: mit
TensorFlow implementation of an arbitrary order Factorization Machine

Projects that are alternatives of or similar to Tffm

Ctr model zoo
some ctr model, implemented by PyTorch, such as Factorization Machines, Field-aware Factorization Machines, DeepFM, xDeepFM, Deep Interest Network
Stars: ✭ 55 (-92.77%)
Mutual labels:  jupyter-notebook, factorization-machines
Deep Learning Coursera
Deep Learning Specialization by Andrew Ng on Coursera.
Stars: ✭ 6,615 (+769.25%)
Mutual labels:  jupyter-notebook
Mememoji
A facial expression classification system that recognizes 6 basic emotions: happy, sad, surprise, fear, anger and neutral.
Stars: ✭ 743 (-2.37%)
Mutual labels:  jupyter-notebook
Learning From Data
记录Learning from data一书中的习题解答
Stars: ✭ 751 (-1.31%)
Mutual labels:  jupyter-notebook
Dat4
General Assembly's Data Science course in Washington, DC
Stars: ✭ 748 (-1.71%)
Mutual labels:  jupyter-notebook
Machine learning refined
Notes, examples, and Python demos for the textbook "Machine Learning Refined" (published by Cambridge University Press).
Stars: ✭ 750 (-1.45%)
Mutual labels:  jupyter-notebook
Getting Things Done With Pytorch
Jupyter Notebook tutorials on solving real-world problems with Machine Learning & Deep Learning using PyTorch. Topics: Face detection with Detectron 2, Time Series anomaly detection with LSTM Autoencoders, Object Detection with YOLO v5, Build your first Neural Network, Time Series forecasting for Coronavirus daily cases, Sentiment Analysis with BERT.
Stars: ✭ 738 (-3.02%)
Mutual labels:  jupyter-notebook
Ml Course Msu
Lecture notes and code for Machine Learning practical course on CMC MSU
Stars: ✭ 759 (-0.26%)
Mutual labels:  jupyter-notebook
Jupyterhub
Multi-user server for Jupyter notebooks
Stars: ✭ 6,488 (+752.56%)
Mutual labels:  jupyter-notebook
Notes Machine Learning
鉴于我没有时间继续写这个东西,这个项目暂时废止
Stars: ✭ 750 (-1.45%)
Mutual labels:  jupyter-notebook
Finetune alexnet with tensorflow
Code for finetuning AlexNet in TensorFlow >= 1.2rc0
Stars: ✭ 748 (-1.71%)
Mutual labels:  jupyter-notebook
Gans In Action
Companion repository to GANs in Action: Deep learning with Generative Adversarial Networks
Stars: ✭ 748 (-1.71%)
Mutual labels:  jupyter-notebook
Graphneuralnetwork
《深入浅出图神经网络:GNN原理解析》配套代码
Stars: ✭ 754 (-0.92%)
Mutual labels:  jupyter-notebook
Spark Movie Lens
An on-line movie recommender using Spark, Python Flask, and the MovieLens dataset
Stars: ✭ 745 (-2.1%)
Mutual labels:  jupyter-notebook
Entity Embedding Rossmann
Stars: ✭ 758 (-0.39%)
Mutual labels:  jupyter-notebook
Neural Processes
This repository contains notebook implementations of the following Neural Process variants: Conditional Neural Processes (CNPs), Neural Processes (NPs), Attentive Neural Processes (ANPs).
Stars: ✭ 744 (-2.23%)
Mutual labels:  jupyter-notebook
Causal inference python code
Python code for part 2 of the book Causal Inference: What If, by Miguel Hernán and James Robins
Stars: ✭ 748 (-1.71%)
Mutual labels:  jupyter-notebook
Simclr
PyTorch implementation of SimCLR: A Simple Framework for Contrastive Learning of Visual Representations
Stars: ✭ 750 (-1.45%)
Mutual labels:  jupyter-notebook
Ec2 Spot Labs
Collection of tools and code examples to demonstrate best practices in using Amazon EC2 Spot Instances.
Stars: ✭ 758 (-0.39%)
Mutual labels:  jupyter-notebook
Notedown
Markdown <=> IPython Notebook
Stars: ✭ 757 (-0.53%)
Mutual labels:  jupyter-notebook

This is a TensorFlow implementation of an arbitrary order (>=2) Factorization Machine based on paper Factorization Machines with libFM.

It supports:

  • dense and sparse inputs
  • different (gradient-based) optimization methods
  • classification/regression via different loss functions (logistic and mse implemented)
  • logging via TensorBoard

The inference time is linear with respect to the number of features.

Tested on Python3.5, but should work on Python2.7

This implementation is quite similar to the one described in Blondel's et al. paper [https://arxiv.org/abs/1607.07195], but was developed independently and prior to the first appearance of the paper.

Dependencies

Installation

Stable version can be installed via pip install tffm.

Usage

The interface is similar to scikit-learn models. To train a 6-order FM model with rank=10 for 100 iterations with learning_rate=0.01 use the following sample

from tffm import TFFMClassifier
model = TFFMClassifier(
    order=6,
    rank=10,
    optimizer=tf.train.AdamOptimizer(learning_rate=0.01),
    n_epochs=100,
    batch_size=-1,
    init_std=0.001,
    input_type='dense'
)
model.fit(X_tr, y_tr, show_progress=True)

See example.ipynb and gpu_benchmark.ipynb for more details.

It's highly recommended to read tffm/core.py for help.

Testing

Just run python test.py in the terminal. nosetests works too, but you must pass the --logging-level=WARNING flag to avoid printing insane amounts of TensorFlow logs to the screen.

Citation

If you use this software in academic research, please, cite it using the following BibTeX:

@misc{trofimov2016,
author = {Mikhail Trofimov, Alexander Novikov},
title = {tffm: TensorFlow implementation of an arbitrary order Factorization Machine},
year = {2016},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/geffy/tffm}},
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].