vignettes/sparse_susie_eval.Rmd
sparse_susie_eval.Rmd
In this vignette, we provide line profiles for revised version SuSiE,
which allows for a sparse matrix structure. We compare speed performance
when the form of the matrix X
is dense and sparse.
In this minimal example, we observe that given a large sparse matrix,
if it is in the dense form, the speed is around 40%
slower
than that in a sparse form.
We randomly simulate a n=1000
by p=1000
dense matrix and a sparse matrix at sparsity \(99\%\), i.e. \(99\%\) entries are zeros.
X
in a dense form
susie.dense <- susie(X.dense,y)
X
in a sparse form
susie.sparse <- susie(X.sparse,y)
# as(<matrix>, "dgeMatrix") is deprecated since Matrix 1.4-2; do as(as(as(., "dMatrix"), "generalMatrix"), "unpackedMatrix") instead