sequential


how to speed up the M-H MCMC with a large number of parameters updated sequentially


I am confronted with a big problem of speeding up the programming. I have a model which have more than 700 parameters and I need to find their posterior distributions which maximize the log-likelihood function. The following is my code:
M = 11
para = matrix(0, M, 771)
wt = rnorm(767, 0, 0.25)
para[1, ] = c(0.397, 0.013, 1.09, wt, 0.5)
trial = rep(1, 771)
acc = rep(0, 771)
for(t in 1:(M-1)){
T = 10^(14) #the small value of T: T=10^6
para.cur = para[t, ]
para.sim = para.cur
current = dam.m4.opt(para.cur)
for(i in 1:771){
if(i != 771){
para.sim[i] = rnorm(1, para.cur[i], 0.25)
}else{
para.sim[i] = abs(rnorm(1, para.cur[i], 0.25))
}
propose = dam.m4.opt(para.sim)
trial[i] = trial[i] +1
a = (propose - current)/T
if(log(runif(1))<a){
para.cur[i] = para.sim[i]
current = propose
acc[i] = acc[i] + 1
}else{
para.sim[i] = para.cur[i]
current = current
}
}
para[t+1, ] = para.cur
}
M is the number of step of the MCMC chain, dam.opt.m4 is the function to calculate the log-likelihood. There are 771 parameters and I need to update them sequentially. T is the tempering. I am wondering how I can use doParallel to speed up the performance? Because of the large number of parameters, even 11 steps can take 3 three days to run so I desperately to know how I can get faster.
I really a appreciate that if anybody can help!

Related Links

Get warnings while exporting data to file in ibm datastage
What is difference between procedural cohesion and sequential cohesion in Software Design Architecture?
how to speed up the M-H MCMC with a large number of parameters updated sequentially
Sequential Consistency in Distributed Systems
Can a D flip flop be enabled this way?
Sequential file reads incorrect file data in IBM datastage 8.1

Categories

HOME
asp.net-core
vbscript
zeromq
stock
platform-builder
bpmn
webstorm
spagobi
framework7
programming-languages
dxl
fsm
cross-browser
windows-server
synchronization
spring-xd
pugjs
propel
contextmenu
mmap
format-specifiers
lcd
buildbot
centos6.5
traffic
maquette
gsoap
airconsole
contact-form
mozilla
force-layout
suricata
bitbucket-pipelines
scaffold
automake
hot-module-replacement
theano.scan
unspecified
elasticsearch-plugin
tasker
awt
particles.js
jvm-languages
bootstrap-dialog
heightmap
apple-news
upstart
hendrix
blogengine.net
winscp-net
tactic
worker-thread
nodebb
windows-mobile-6.5
ifs
cudafy.net
iso8601
lync-client-sdk
crosswalk-runtime
or-tools
mediaelement
google-feed-api
nxt
mikroc
autorest
gstreamer-0.10
goose
jfugue
google-places
ruby-2.2
fouc
emailrelay
key-management
clicktag
nsbutton
funcunit
picturefill
meteor-velocity
web2py-modules
sharp-repository
drools-planner
runas
uiviewanimation-curve
jquery-ui-layout
hirefire
f#-powerpack
disclosure
html-input
cxxtest
yslow
gin
bespin
thunderbird-lightning
eqatec
genealogy
multiple-languages

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App