dstein64 / pyfms

A Theano-based Python implementation of Factorization Machines (Rendle 2010).
https://pypi.org/project/pyfms/
MIT License
27 stars 7 forks source link

do you have special code for sparse data? #2

Closed Sandy4321 closed 6 years ago

Sandy4321 commented 6 years ago

is your code running faster of sparse data?

dstein64 commented 6 years ago

Hi @Sandy4321, my code has not been optimized to run on sparse data, although sparse data is supported as long as it's represented by a dense numpy matrix with 0s.

There is a fork of the project that adds support for sparse matrices. However, that is currently 41 commits behind this project.

Sandy4321 commented 6 years ago

Hello

It is exactly how I found your code by using this link https://github.com/srome/PyFactorizationMachines The problem with link is that there is no advanced optimization like Adam and GPU use But problem with your code is, that sparse data representation is not used, so big matrices can not be used. For example data from this link https://github.com/srome/PyFactorizationMachines can not be represented in dense matrix , since it uses huge matrix , that can not be placed in RAM Can you try to use sparse matrix ?

dstein64 commented 6 years ago

@Sandy4321, pyfms version 0.2.6 now has support for sparse data. Please see the documentation and example for usage details.