CosmoMC: Importance Sampling
-
- Posts: 73
- Joined: January 04 2005
- Affiliation: NAOC
- Contact:
CosmoMC: Importance Sampling
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
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
-
- Posts: 23
- Joined: February 21 2006
- Affiliation: McGill University
CosmoMC: Importance Sampling
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
Set redo_add = F and then include the data sets you need, e.g. CMB+LSS. That should work.
Loison Hoi
1 Aug 2006
-
- Posts: 73
- Joined: January 04 2005
- Affiliation: NAOC
- Contact:
CosmoMC: Importance Sampling
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
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
-
- Posts: 23
- Joined: February 21 2006
- Affiliation: McGill University
CosmoMC: Importance Sampling
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
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
-
- Posts: 73
- Joined: January 04 2005
- Affiliation: NAOC
- Contact:
CosmoMC: Importance Sampling
Thanks very much.
Gong-Bo
Gong-Bo