quyuanhang / factorizer

Matrix factorization using TensorFlow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Matrix Factorizer using TensorFlow

This is some proof-of-concept code for doing matrix factorization using TensorFlow for the purposes of making content recommendations. It was inspired by the following papers on matrix factorization:

Example usage

Ratings triplets (COO sparse matrix format) need to be available as a feather file with columns user_id, item_id and rating, where user_id is the zero-based user index, item_id is the zero-based item index, and rating is the rating for the specified (user, item) pair.

The path to the feather file is passed in as the first argument.

Usage:

python factorizer.py [path/to/triplets.feather] [maximum_iterations] [what_to_learn] [[regularization_parameter] [rank]]

For example, to learn 5 latent features:

python factorizer.py ~/Desktop/ratings_triplets.feather 100 features-only 10.0 5

About

Matrix factorization using TensorFlow


Languages

Language:Python 100.0%