CosmoMC: Importance Sampling

Use of Healpix, camb, CLASS, cosmomc, compilers, etc.
Post Reply
gongbo zhao
Posts: 69
Joined: January 04 2005
Affiliation: ICG, Portsmouth
Contact:

CosmoMC: Importance Sampling

Post by gongbo zhao » August 01 2006

Dear all,
I have generated the binary *.data files using all data. Is it possible to substract some dataset by importance sampling (For example, I have *.data of CMB+SN+LSS ,now I want CMB+LSS ) ? Or the importance sampling can only "add" dataset rather than substract?
Thanks so much.


Cheers,
Gong-Bo Zhao

Loison Hoi
Posts: 23
Joined: February 21 2006
Affiliation: McGill University

CosmoMC: Importance Sampling

Post by Loison Hoi » August 01 2006

Hi,

Set redo_add = F and then include the data sets you need, e.g. CMB+LSS. That should work.

Loison Hoi
1 Aug 2006

gongbo zhao
Posts: 69
Joined: January 04 2005
Affiliation: ICG, Portsmouth
Contact:

CosmoMC: Importance Sampling

Post by gongbo zhao » August 02 2006

HI,Loison,
Thanks for your reply.
Something on the "redo_likeoffset" parameter . From the original code in postprocess.f90:
weight = exp(like-truelike+PostParams%redo_likeoffset)
It seems "redo_likeoffset" should be the difference of ln(likelihood)between the new model and the old one. Roughly it can be set as the half of difference of the d.o.f. of the two models. The result is not sensitive to "redo_likeoffset", it just renormalizes the weight to a meaningful quantity. Am I right?

Best,
Gong-Bo Zhao

Loison Hoi
Posts: 23
Joined: February 21 2006
Affiliation: McGill University

CosmoMC: Importance Sampling

Post by Loison Hoi » August 02 2006

Hi Gong-Bo,

Yes, seems right. At the end of may06 version postprocess.f90, there are two statements:

write (*,*) 'WARNING: use redo_likeoffset to rescale likelihoods'
write (*,*) 'Try redo_likeoffset = ',max_truelike - max_like

So, if you use a wrong value of offset, cosmomc will give you a hint. Usually, I will try several numbers, which are close to the \Delta (-ln L), to make the weight close to unity.

Loison Hoi
2 Aug 2006

gongbo zhao
Posts: 69
Joined: January 04 2005
Affiliation: ICG, Portsmouth
Contact:

CosmoMC: Importance Sampling

Post by gongbo zhao » August 05 2006

Thanks very much.

Gong-Bo

Post Reply