GithubHelp home page GithubHelp logo

gfm's Introduction

gFM: A toolbox for generalized Factorization Machine on Terabyte Data

The gFM toolbox provides the-state-of-the-art solvers for the generalized Factorization Machine (gFM). The gFM toolbox is able to learning gFM model with tens of thousands of dimensions on Terabyte datasets. The gFM toolbox is very fast and has provable guarantees. gFM is compatible to sklearn API. gFM is still under active development. In the future, the gFM toolbox aims to run on multiple CPUs and GPUs.

gFM is available at

https://github.com/MingLin-home/gFM

If you find this software useful, please cite our work:

Ming Lin, Jieping Ye. A Non-convex One-Pass Framework for Generalized Factorization Machine and Rank-One Matrix Sensing. The Thirtieth Annual Conference on Neural Information Processing Systems (NIPS), 2016.

===== Bibtex Entry =====

@inproceedings{ming_lin_non-convex_2016, title = {A Non-convex One-Pass Framework for Factorization Machines and Rank-One Matrix Sensing}, booktitle = {The Thirtieth Annual Conference on Neural Information Processing Systems (NIPS)}, author = {{Ming Lin} and {Jieping Ye}}, year = {2016} }

Why another Factorization Machine library?

There are libfm and several python wrappers such as pywFM, pyFM or fastFM. However, the algorithms implemented in these packages might converge to local minima or saddle point. Numerical experiments suggest that with very high probability these algorithms cannot converge to the global optimal solution.

The algorithm implemented in gFM is provably convergent to global optimal solution. The convergence rate is linear /geometrical. In addition, gFM implements a generalized version of Factorization Machine. The second order feature interaction coefficient matrix in gFM doesn't need to be semi-positive definite therefore is more powerful than conventional Factorization Machine models.

Installation

gFM is a single python library. Copy gFM.py to your project root or any directory in your PYTHONPATH environment variable. That's it!

Quick Usage

Assume we have loaded the feature matrix X and the label vector y into memory. Each column of X presents one instance and y is a column vector. We want to learn a rank-10 gFM model. To train gFM:

import gFM

k = 10

my_gFM_solver = gFM.BatchRegression(rank_k=k)

my_gFM_solver.fit(X,y)

To predict:

predicted_regression_value = my_gFM_solver.predict(X)

You can use gFM with sklearn modules such GridSearch and Cross-validation.

API Design

gFM toolbox implements the algorithm proposed in our NISP 2016 paper. It provides a batch updating implementation and a mini-batch updating implementation. The usage examples are given in the tutorial/ directory. Also check the docstring in gFM.py for advanced usage.

The mini-batch version and GPU version is on the way!

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.