evanwang1990 / FMwR

FMwR: A Library of Factorization Machines in R Based on libfm
GNU General Public License v3.0
7 stars 3 forks source link

sparse matrix input #1

Closed dselivanov closed 7 years ago

dselivanov commented 7 years ago

Hi. Thanks for your work, looks like amazing package (but documentation little bit sparse). Is it possible to allow sparse matrix input to fm, not formula?

I also looked to fastFM library to make R interface, but don't have time for that. However I noticed that you implemented everything from scratch here. Any reasons to not use fastFM (I realize that here you implemented more optimizers and openmp support, but mb something else)?

Will be happy to contribute to development.

evanwang1990 commented 7 years ago

Hi dselivanov, thanks for your feedback. I'm sorry for my laziness and poor English, the documentation is not finished yet...

I will contruct the fm.matrix object from dense matrix, sparse matrix or formula, which is the only input form for fm. The only reason to not use fastFm is that I think it is much more easier to process data with data.table in R than Pandas in python, haha...

dselivanov commented 7 years ago

Agree about data.table :-) But I meant wrap fastFM-core underlying C library. Before I found this repo I thought create R/Rcpp interface to fastFM-core.

evanwang1990 commented 7 years ago

I have created a function fm.matrix, which accepts dense matrix, sparse matrix or data.frame as input

dselivanov commented 7 years ago

thanks! will test this weekend.

evanwang1990 commented 7 years ago

there are two simple examples in fm_train.Rd

dselivanov commented 7 years ago

Sparse matrices works fine, so I'm closing this. Thank you for fast implementation.