Analysis After Increasing the temperature of the chains in commomn.ini

Use of Healpix, camb, CLASS, cosmomc, compilers, etc.
Post Reply
Mayukh Gangopadhyay
Posts: 6
Joined: August 04 2017
Affiliation: Saha Institute of Nuclear Physics

Analysis After Increasing the temperature of the chains in c

Post by Mayukh Gangopadhyay » August 23 2017

Hi,
I am dealing with a very slowly converging simulation. The reason I realised is a long tail and thus the slow mixing. So as advised in the cosmomc readme file, I increased the temperature of the chains from 1 to 2. Now my runs are much faster and one of the runs already converged to the desired R−1 value. Now my question is how to readjust the statistics obtained from this run to get the true statistical values for the parameters in question?
In the readme file it says, GetDist can adjust for the temperature automatically. But I am not sure where or how it does.
Another thing regarding this problem is: I understand increasing the temperature means the T is increased in P(x)1/T. Now is there any upper limit that one should use when you have to increase T. What I mean, is taking T=2 too much of an increase?
It would be very nice to get some references where T is being increased to do the analysis.

Antony Lewis
Posts: 1354
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: Analysis After Increasing the temperature of the chains

Post by Antony Lewis » August 23 2017

You just need to set the "cool" parameter when running getdist, e.g. cool=2 in your case. (adjusting for temperature is easy as long as the temperature is not too high: effectively it importance samples from the high temperature distribution to the low-temperature one).

Antony Lewis
Posts: 1354
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: Analysis After Increasing the temperature of the chains

Post by Antony Lewis » August 23 2017

PS. I suggest never editing files in batch2/ etc. The way to change parameters is to make a new ini file in another directory (like the supplied test.ini), which uses DEFAULT(..filename...) to includes settings you want from from files in batch2. You can then inherit and override settings in batch2 without changing the original files.

Mayukh Gangopadhyay
Posts: 6
Joined: August 04 2017
Affiliation: Saha Institute of Nuclear Physics

Analysis After Increasing the temperature of the chains in c

Post by Mayukh Gangopadhyay » August 23 2017

Thank you Anthony for your prompt reply.

Mayukh Gangopadhyay
Posts: 6
Joined: August 04 2017
Affiliation: Saha Institute of Nuclear Physics

Analysis After Increasing the temperature of the chains in c

Post by Mayukh Gangopadhyay » August 25 2017

Hi,
I have another problem regarding the same issue. I state it here:

After running with temperature = 2, when we analyse the data with cool = 2 in distparams.ini with "python python/GetDist.py distparams.ini", following is the error that we got:

Best fit sample -log(Like) = 1266.571000

mean(-Ln(like)) = 1272.535056

-Ln(mean like) = 1268.978640

Traceback (most recent call last):

File "python/GetDist.py", line 357, in <module>
main(args)
File "python/GetDist.py", line 194, in main
mc._setDensitiesandMarge1D(writeDataToFile=not no_plots and plot_data_dir, meanlikes=plot_meanlikes)
File "CosmoMC-Nov2016_08/python/getdist/mcsamples.py", line 2077, in _setDensitiesandMarge1D
meanlikes=meanlikes)
File "CosmoMC-Nov2016_08/python/getdist/mcsamples.py", line 1281, in get1DDensityGridData
* (binmax - binmin) * abs(smooth_scale_1D) / fine_width
File "CosmoMC-Nov2016_08/python/getdist/mcsamples.py", line 1047, in getAutoBandwidth1D
Neff = self._get1DNeff(par, param)
File "CosmoMC-Nov2016_08/python/getdist/mcsamples.py", line 1028, in get1DNeff
par.Neff_kde = self.getEffectiveSamplesGaussianKDE(param, scale=par.sigma_range)
File "CosmoMC-Nov2016_08/python/getdist/chains.py", line 407, in getEffectiveSamplesGaussianKDE
corr = np.zeros(maxoff + 1)
ValueError: Maximum allowed dimension exceeded

Can you please suggest a way out?
Mayukh

Mayukh Gangopadhyay
Posts: 6
Joined: August 04 2017
Affiliation: Saha Institute of Nuclear Physics

Re: Analysis After Increasing the temperature of the chains

Post by Mayukh Gangopadhyay » August 25 2017

Mayukh Gangopadhyay wrote:Hi,
I have another problem regarding the same issue. I state it here:

After running with temperature = 2, when we analyse the data with cool = 2 in distparams.ini with "python python/GetDist.py distparams.ini", following is the error that we got:

Code: Select allp>

Best fit sample -log&#40;Like&#41; = 1266.571000  
                                                                                                    
mean&#40;-Ln&#40;like&#41;&#41; = 1272.535056
                                                                                                                 
-Ln&#40;mean like&#41;  = 1268.978640  
                                                                                                               
Traceback &#40;most recent call last&#41;&#58;    
                                                                                                        
  File "python/GetDist.py", line 357, in <module>                                                                                             
    main&#40;args&#41;                                                                                                                                
  File "python/GetDist.py", line 194, in main                                                                                                 
    mc._setDensitiesandMarge1D&#40;writeDataToFile=not no_plots and plot_data_dir, meanlikes=plot_meanlikes&#41;                                      
  File "CosmoMC-Nov2016_08/python/getdist/mcsamples.py", line 2077, in _setDensitiesandMarge1D
    meanlikes=meanlikes&#41;
  File "CosmoMC-Nov2016_08/python/getdist/mcsamples.py", line 1281, in get1DDensityGridData
    * &#40;binmax - binmin&#41; * abs&#40;smooth_scale_1D&#41; / fine_width
  File "CosmoMC-Nov2016_08/python/getdist/mcsamples.py", line 1047, in getAutoBandwidth1D
    Neff = self._get1DNeff&#40;par, param&#41;
  File "CosmoMC-Nov2016_08/python/getdist/mcsamples.py", line 1028, in get1DNeff
    par.Neff_kde = self.getEffectiveSamplesGaussianKDE&#40;param, scale=par.sigma_range&#41;
  File "CosmoMC-Nov2016_08/python/getdist/chains.py", line 407, in getEffectiveSamplesGaussianKDE
    corr = np.zeros&#40;maxoff + 1&#41;
ValueError&#58; Maximum allowed dimension exceeded
Can you please suggest a way out?
Mayukh

Antony Lewis
Posts: 1354
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: Analysis After Increasing the temperature of the chains

Post by Antony Lewis » August 25 2017

Not sure what that is, but I'd try the latest getdist from github. If that still gives an error, please email me a link to your chains and analysis settings.

Mayukh Gangopadhyay
Posts: 6
Joined: August 04 2017
Affiliation: Saha Institute of Nuclear Physics

Analysis After Increasing the temperature of the chains in c

Post by Mayukh Gangopadhyay » August 25 2017

Thanks will do that then.

Mayukh Gangopadhyay
Posts: 6
Joined: August 04 2017
Affiliation: Saha Institute of Nuclear Physics

Analysis After Increasing the temperature of the chains in c

Post by Mayukh Gangopadhyay » September 01 2017

Hi,
I am still having trouble with the getdistGUI.
I can get the triangle plots only with getdistGUI, but cannot get the margestats and likestats files. The two main errors that it shows when trying to plot with getdistGUI or with python/getdist are following:

Code: Select allp>

ValueError&#58; Maximum allowed dimension exceeded
MCSamplesError&#58; Parameter range is <= 0&#58; chi2_prior
It would be great to get some advice

Antony Lewis
Posts: 1354
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: Analysis After Increasing the temperature of the chains

Post by Antony Lewis » September 01 2017

For the "ValueError: Maximum allowed dimension exceeded " I don't know, I'd look at the call stack.

The range error is usually because you have something with a negative chi2. You can edit the .ranges file to set the range for that parameter not to start at 0.

Post Reply