model_frame_libFM: Converts a data frame into a format digestable for libFM

Description Usage Arguments Details Value See Also Examples

Description

This can only deal with factors as covariate. It is important to make sure your covariates are all factors (not indicators), or else it will not work correctly

Usage

1

Arguments

formula

the formula with the response on the left hand side and the covariates on the right hand side

data

data.frame

...

optional, currently unused, arguments

Details

If your data is sparse, sp_matrix_libFM is about 100 times faster than matrix_libFM. I recommend using the sparse version over the standard version whenever possible. If your data consists of factor variables with a lot of levels, model_frame_libFM is faster than sp_matrix_libFM.

Value

a character vector with one value per observation

See Also

sp_matrix_libFM, matrix_libFM

Examples

1
2
3
4
data(movie_lens)

movie_lens_libFM = model_frame_libFM(Rating ~ User + Movie, movie_lens)
tail(movie_lens_libFM, 10)

andland/libFMexe documentation built on May 12, 2019, 2:41 a.m.