Merge pull request #1360 from JohannesPfeifer/mh_recover_load_octave
Document different treatment of mh_recover and load_mh_file under Octavetime-shift
commit
4a93d0f9f0
|
@ -5304,7 +5304,9 @@ simulation that crashed prematurely, starting with the last available saved
|
||||||
the proposal density from the previous run will automatically be loaded. In older versions,
|
the proposal density from the previous run will automatically be loaded. In older versions,
|
||||||
to assure a neat continuation of the chain with the same proposal density, you should
|
to assure a neat continuation of the chain with the same proposal density, you should
|
||||||
provide the @code{mode_file} used in the previous
|
provide the @code{mode_file} used in the previous
|
||||||
run or the same user-defined @code{mcmc_jumping_covariance} when using this option.
|
run or the same user-defined @code{mcmc_jumping_covariance} when using this option. Note that
|
||||||
|
under Octave, a neat continuation of the crashed chain with the respective last random number
|
||||||
|
generator state is currently not supported.
|
||||||
|
|
||||||
@item mh_mode = @var{INTEGER}
|
@item mh_mode = @var{INTEGER}
|
||||||
@dots{}
|
@dots{}
|
||||||
|
@ -5476,7 +5478,9 @@ the proposal density from the previous run will automatically be loaded. In olde
|
||||||
to assure a neat continuation of the chain with the same proposal density, you should
|
to assure a neat continuation of the chain with the same proposal density, you should
|
||||||
provide the @code{mode_file} used in the previous
|
provide the @code{mode_file} used in the previous
|
||||||
run or the same user-defined @code{mcmc_jumping_covariance} when using this option.
|
run or the same user-defined @code{mcmc_jumping_covariance} when using this option.
|
||||||
Shouldn't be used together with @code{mh_recover}.
|
Shouldn't be used together with @code{mh_recover}. Note that under Octave, a neat
|
||||||
|
continuation of the chain with the last random number
|
||||||
|
generator state of the already present draws is currently not supported.
|
||||||
|
|
||||||
@item load_results_after_load_mh
|
@item load_results_after_load_mh
|
||||||
@anchor{load_results_after_load_mh} This option is available when loading a previous MCMC run without
|
@anchor{load_results_after_load_mh} This option is available when loading a previous MCMC run without
|
||||||
|
|
|
@ -26,6 +26,7 @@ if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
||||||
error('Draws of affected chain''s unaffected files are not the same')
|
error('Draws of affected chain''s unaffected files are not the same')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if ~isoctave
|
||||||
%check second, affected chain with affected file
|
%check second, affected chain with affected file
|
||||||
temp1=load([M_.dname '_mh2_blck2.mat']);
|
temp1=load([M_.dname '_mh2_blck2.mat']);
|
||||||
temp2=load([M_.dname filesep 'metropolis' filesep M_.dname '_mh2_blck2.mat']);
|
temp2=load([M_.dname filesep 'metropolis' filesep M_.dname '_mh2_blck2.mat']);
|
||||||
|
@ -33,3 +34,4 @@ temp2=load([M_.dname filesep 'metropolis' filesep M_.dname '_mh2_blck2.mat']);
|
||||||
if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
||||||
error('Draws of affected chain''s affected files are not the same')
|
error('Draws of affected chain''s affected files are not the same')
|
||||||
end
|
end
|
||||||
|
end
|
|
@ -32,6 +32,7 @@ if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
||||||
error('Draws of affected chain''s unaffected files are not the same')
|
error('Draws of affected chain''s unaffected files are not the same')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if ~isoctave
|
||||||
%check second, affected chain with affected file
|
%check second, affected chain with affected file
|
||||||
temp1=load([M_.dname '_mh4_blck2.mat']);
|
temp1=load([M_.dname '_mh4_blck2.mat']);
|
||||||
temp2=load([M_.dname filesep 'metropolis' filesep M_.dname '_mh4_blck2.mat']);
|
temp2=load([M_.dname filesep 'metropolis' filesep M_.dname '_mh4_blck2.mat']);
|
||||||
|
@ -47,3 +48,5 @@ temp2=load([M_.dname filesep 'metropolis' filesep M_.dname '_mh5_blck2.mat']);
|
||||||
if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
||||||
error('Draws of affected chain''s affected files are not the same')
|
error('Draws of affected chain''s affected files are not the same')
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
@ -30,6 +30,7 @@ if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
||||||
error('Draws of affected chain''s unaffected files are not the same')
|
error('Draws of affected chain''s unaffected files are not the same')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if ~isoctave
|
||||||
%check second, affected chain with affected file
|
%check second, affected chain with affected file
|
||||||
temp1=load([M_.dname '_mh4_blck2.mat']);
|
temp1=load([M_.dname '_mh4_blck2.mat']);
|
||||||
temp2=load([M_.dname filesep 'metropolis' filesep M_.dname '_mh4_blck2.mat']);
|
temp2=load([M_.dname filesep 'metropolis' filesep M_.dname '_mh4_blck2.mat']);
|
||||||
|
@ -37,3 +38,4 @@ temp2=load([M_.dname filesep 'metropolis' filesep M_.dname '_mh4_blck2.mat']);
|
||||||
if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
||||||
error('Draws of affected chain''s affected files are not the same')
|
error('Draws of affected chain''s affected files are not the same')
|
||||||
end
|
end
|
||||||
|
end
|
|
@ -26,6 +26,7 @@ if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
||||||
error('Draws of affected chain''s unaffected files are not the same')
|
error('Draws of affected chain''s unaffected files are not the same')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if ~isoctave
|
||||||
%check second, affected chain with affected file
|
%check second, affected chain with affected file
|
||||||
temp1=load([M_.dname '_mh2_blck2.mat']);
|
temp1=load([M_.dname '_mh2_blck2.mat']);
|
||||||
temp2=load([M_.dname filesep 'metropolis' filesep M_.dname '_mh2_blck2.mat']);
|
temp2=load([M_.dname filesep 'metropolis' filesep M_.dname '_mh2_blck2.mat']);
|
||||||
|
@ -33,3 +34,4 @@ temp2=load([M_.dname filesep 'metropolis' filesep M_.dname '_mh2_blck2.mat']);
|
||||||
if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
||||||
error('Draws of affected chain''s affected files are not the same')
|
error('Draws of affected chain''s affected files are not the same')
|
||||||
end
|
end
|
||||||
|
end
|
|
@ -111,8 +111,10 @@ estimation(mode_compute=0,mode_file=fs2000_mode,order=1, datafile=fsdat_simul, n
|
||||||
temp1=load([M_.dname '_mh1_blck1.mat']);
|
temp1=load([M_.dname '_mh1_blck1.mat']);
|
||||||
temp2=load([M_.dname filesep 'metropolis' filesep M_.dname '_mh1_blck1.mat']);
|
temp2=load([M_.dname filesep 'metropolis' filesep M_.dname '_mh1_blck1.mat']);
|
||||||
|
|
||||||
|
if ~isoctave
|
||||||
if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
if max(max(abs(temp1.x2-temp2.x2)))>1e-10
|
||||||
error('Draws of unaffected chain are not the same')
|
error('Adding draws did not result in the same chain')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
save('fs2000_result.mat','oo_')
|
save('fs2000_result.mat','oo_')
|
||||||
|
|
Loading…
Reference in New Issue