Analysis After Increasing the temperature of the chains in commomn.ini
-
- Posts: 6
- Joined: August 04 2017
- Affiliation: Saha Institute of Nuclear Physics
Analysis After Increasing the temperature of the chains in c
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.
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.
-
- Posts: 1951
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: Analysis After Increasing the temperature of the chains
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).
-
- Posts: 1951
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: Analysis After Increasing the temperature of the chains
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.
-
- Posts: 6
- Joined: August 04 2017
- Affiliation: Saha Institute of Nuclear Physics
Analysis After Increasing the temperature of the chains in c
Thank you Anthony for your prompt reply.
-
- Posts: 6
- Joined: August 04 2017
- Affiliation: Saha Institute of Nuclear Physics
Analysis After Increasing the temperature of the chains in c
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
N_eff = self._get1DNeff(par, param)
File "CosmoMC-Nov2016_08/python/getdist/mcsamples.py", line 1028, in _get1DNeff
par.N_eff_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
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
N_eff = self._get1DNeff(par, param)
File "CosmoMC-Nov2016_08/python/getdist/mcsamples.py", line 1028, in _get1DNeff
par.N_eff_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
-
- Posts: 6
- Joined: August 04 2017
- Affiliation: Saha Institute of Nuclear Physics
Re: Analysis After Increasing the temperature of the chains
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:Can you please suggest a way out?Code: Select all
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 N_eff = self._get1DNeff(par, param) File "CosmoMC-Nov2016_08/python/getdist/mcsamples.py", line 1028, in _get1DNeff par.N_eff_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
Mayukh
-
- Posts: 1951
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: Analysis After Increasing the temperature of the chains
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.
-
- Posts: 6
- Joined: August 04 2017
- Affiliation: Saha Institute of Nuclear Physics
Analysis After Increasing the temperature of the chains in c
Thanks will do that then.
-
- Posts: 6
- Joined: August 04 2017
- Affiliation: Saha Institute of Nuclear Physics
Analysis After Increasing the temperature of the chains in c
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:
It would be great to get some advice
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 all
ValueError: Maximum allowed dimension exceeded
MCSamplesError: Parameter range is <= 0: chi2_prior
-
- Posts: 1951
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: Analysis After Increasing the temperature of the chains
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.
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.