Last updated: 2018-02-27
Code version: 7162970
R.matlab v3.6.1 (2016-10-19) successfully loaded. See ?R.matlab for help.
Attaching package: 'R.matlab'
The following objects are masked from 'package:base':
getOption, isOpen
MovieLens 100K data:
The data contains about 100K user-movie ratings (integers from 1 to 5) from approximately 1000 users across a total of 1700 movies. Most users do not rate most movies, so the matrix is sparsely observed (94% missing). We centered and scaled the ratings for each user before applying methods to these data.
ml100K_data = readRDS("../data/scale_data.rds")
MLMatrix <- sparseMatrix(i = ml100K_data[,1],
j = ml100K_data[,2],
x = ml100K_data[,3],dims = c(943,1682))
# turn this sparse matrix into matrix in r
Y = as.matrix(MLMatrix)
Y[which(Y == 0)] = NA
Flash:
flash_data = flash_set_data(Y)
fmodel = flash(flash_data, greedy = TRUE, backfit = TRUE)
saveRDS(fmodel, '../output/MovieLensVarCol.rds')
Flash again on the loading matrix
flash_loading = flash_set_data(fmodel$EL[,1:5])
flmodel = flash(flash_loading, ebnm_fn = ebnm_ash, backfit = TRUE, greedy = TRUE)
The flash prefers the rank 0 model. There is no hidden structure in the loading matrix.
sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.3
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] Matrix_1.2-12 R.matlab_3.6.1 flashr_0.5-1
loaded via a namespace (and not attached):
[1] Rcpp_0.12.15 lattice_0.20-35 digest_0.6.13
[4] rprojroot_1.2 R.methodsS3_1.7.1 grid_3.4.3
[7] backports_1.1.2 git2r_0.20.0 magrittr_1.5
[10] evaluate_0.10.1 stringi_1.1.6 R.utils_2.6.0
[13] R.oo_1.21.0 rmarkdown_1.8 tools_3.4.3
[16] stringr_1.2.0 yaml_2.1.16 compiler_3.4.3
[19] htmltools_0.3.6 knitr_1.17
This R Markdown site was created with workflowr