Last updated: 2018-03-06
Code version: e16e34a
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-6
loaded via a namespace (and not attached):
[1] Rcpp_0.12.15 compiler_3.4.3 git2r_0.20.0
[4] plyr_1.8.4 R.utils_2.6.0 R.methodsS3_1.7.1
[7] iterators_1.0.9 tools_3.4.3 digest_0.6.13
[10] evaluate_0.10.1 tibble_1.3.4 gtable_0.2.0
[13] lattice_0.20-35 rlang_0.1.6 foreach_1.4.4
[16] yaml_2.1.17 parallel_3.4.3 ebnm_0.1-10
[19] stringr_1.3.0 knitr_1.20 rprojroot_1.2
[22] grid_3.4.3 rmarkdown_1.8 ggplot2_2.2.1
[25] ashr_2.2-7 magrittr_1.5 backports_1.1.2
[28] scales_0.5.0 codetools_0.2-15 htmltools_0.3.6
[31] MASS_7.3-47 assertthat_0.2.0 softImpute_1.4
[34] colorspace_1.3-2 stringi_1.1.6 lazyeval_0.2.1
[37] pscl_1.5.2 doParallel_1.0.11 munsell_0.4.3
[40] truncnorm_1.0-8 SQUAREM_2017.10-1 R.oo_1.21.0
This R Markdown site was created with workflowr