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
pandas
omnet++
gremlin
iterator
xmpp
youtube-api-v3
ip
fsm
google-project-tango
callback
installshield
angular-ui-bootstrap
convolution
swagger-ui
android-youtube-api
virtualization
primary-key
imacros
windows-azure-storage
ghc
openrefine
transformation
jqwidget
viewport
lucene.net
rundeck
vlsi
pingfederate
phpfox
filezilla
fopen
fifo
libuv
webkitspeechrecognition
gitignore
gsmcomm
sql-server-2012-express
frame
javascriptcore
key-value-observing
semantic-versioning
airconsole
vsts-build-task
textmate
serve
hilbert-curve
android-tabhost
fedex
quadratic-programming
google-closure
total-commander
youcompleteme
strptime
jquery-validate
hendrix
boost-multi-index
lowpass-filter
setter
knockout-components
r-forge
python-cryptography
pdfclown
nbconvert
hittest
messenger
gridpane
slicknav
ado.net-entity-data-model
intrusion-detection
multi-level
mongocsharpdriver
clang-static-analyzer
nsviewcontroller
skype4py
hover-over
asp.net5
iad
qtableview
deis
splash
tt-news
cctv
applescript-objc
neolane
xojo
android-radiobutton
article
valuechangelistener
xceed-datagrid
picturefill
gnu-smalltalk
gridfs
easy-install
multipage
getmessage
buildr
fireworks
coredump
invite
paster
wise
mirah
mdac

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App