Closed gwern closed 8 years ago
@gwern Thanks for your time on trying rss
on Octave. Here are my replies.
in
example1.m
, replacematfile
withload
and delete the twoprogess_bar
calls
progress_bar
is a just a tool to viz the progress of MCMC, so removing it does not affect the results.
... I don't know where
invnormcdf
comes from but Octave doesn't have it ...
invnormcdf
is a sub-routine in lightspeed
library, which computes the normal quantiles.
... I couldn't figure out how to solve in the uses of
sample
...
sample
is not a Matlab built-in function; it is provided by lightspeed
, which generates random numbers from categorical distribution.
I agree that the implementation of rss
based on commercial language (e.g. Matlab) could be a barrier. However, I do not plan to convert rss
to Octave in the near future. Instead, I am considering an open-source version of rss
that is coded either in R
or C++
. I will keep you posted.
Thanks again for your time and interest in our methods! Feel free to contact me if you have any other questions.
removing it does not affect the results.
Right, that's why I felt deleting it was safe.
sample is not a Matlab built-in function; it is provided by lightspeed, which generates random numbers from categorical distribution.
Ah. I got that one wrong. Generating from a categorical doesn't sound too hard to clone.
Instead, I am considering an open-source version of rss that is coded either in R or C++.
I use R mostly, so I'd be pleased to see an R library I could use to get a full R workflow: load in a public polygenic score dataset, do rss on it to get posteriors, model stuff with those posteriors (eg with BCEA) or pass them into JAGS for further processing etc. (But C++ might have other advantages, so don't let my preferences stop you.)
In the mean time, I think I'll look into getting my hands on Matlab somehow. Apparently the Machine Learning Coursera comes with a free trial I might be able to use.
Hi Gwern @gwern
I hope all is well. As I mentioned in a previous reply, we are working on an R
package development for RSS
-related methods (rssr
), which is currently led by my colleague Nick (@CreRecombinase). You might be interested in a pre-release of rssr
package.
Specifically, please go to https://github.com/stephenslab/rssr, and do the following:
install.packages('devtools')
devtools::install_github("stephenslab/rssr",ref="v0.1.1-alpha",build_vignettes=TRUE)
vignette("example")
The vignette shows that rssr::rss_varbvsr_naive
and rss_varbvsr.m
produce the same results. Hence, you can instead use rssr::rss_varbvsr_naive
in R
if you are interested in the algorithms behind rss_varbvsr.m
but cannot get it installed in Matlab
.
Please note that this is only a pre-release. A lot of work should be done before we can safely call it a "release". For example, we only consider one model (RSS-BVSR) and one algorithm (variational approximation) in this pre-release. In addition, the documentation is lacking. Please feel free to contact me if you have any relevant question.
We only make the basic algorithms publicly available at this point. We developed several more advanced variants (both in Matlab
and R
) for our large-scale analyses, and we will make them public as soon as we submit our manuscripts.
I can't afford Matlab, so I was hoping to run this in Octave. I don't know much about either, but it seems nontrivial to get
example1.m
up and working in Octave.After a couple of hours, I got most of the example working with the following edits:
example1.m
, replacematfile
withload
and delete the twoprogess_bar
callssrc/rss_bvsr.m
, deleteprogress_bar
calls; I don't know whereinvnormcdf
comes from but Octave doesn't have it, so dump that in at the end:in
src/calc_posterior_bvsr.m
, thesolve_tril
/solve_triu
calls go to the lightspeed library, but don't seem to be anything but a optimized/
operator (and I'm not sure the lightspeed dep is even worth having since I didn't notice much difference in runtimes with/without and it's an old proprietary library), so it would just readin
propose_gamma.m
, Octave doesn't havecontainers
but it does have structs, which are string-indexed maps, so replacing is fairly straightforward:Unfortunately, I then hit a problem I couldn't figure out how to solve in the uses of
sample
which seems to be https://www.mathworks.com/help/sldo/ref/sdo.sample.html but I couldn't find any Octave equivalents googling. So I had to stop there.rss-octave.diff.txt
But it would be nice if rss could be made to work with Octave so everyone can run it.