Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynare
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marco Ratto
dynare
Commits
e9dff256
Commit
e9dff256
authored
4 years ago
by
Marco Ratto
Browse files
Options
Downloads
Patches
Plain Diff
only check for backslash under unix. check for the existence of record and prior files.
parent
e0534d5b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#5298
passed
4 years ago
Stage: build
Stage: test
Stage: pkg
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/posterior_sampler_initialization.m
+12
-4
12 additions, 4 deletions
matlab/posterior_sampler_initialization.m
with
12 additions
and
4 deletions
matlab/posterior_sampler_initialization.m
+
12
−
4
View file @
e9dff256
...
...
@@ -122,8 +122,12 @@ if ~options_.load_mh_file && ~options_.mh_recover
if
~
isempty
(
RecordFile0
)
%% check for proper filesep char in user defined paths
RecordFile0
=
strrep
(
RecordFile0
,
'\'
,
filesep
);
RecordFile0
=
strrep
(
RecordFile0
,
'/'
,
filesep
);
record0
=
load
(
RecordFile0
);
if
isempty
(
dir
(
RecordFile0
))
disp
(
'Estimation::mcmc: wrong value for mh_initialize_from_previous_mcmc_record option'
)
error
(
'Estimation::mcmc: path to record file is not found'
)
else
record0
=
load
(
RecordFile0
);
end
record0
=
record0
.
record
;
MetropolisFolder0
=
fileparts
(
RecordFile0
);
PreviousFolder0
=
fileparts
(
MetropolisFolder0
);
...
...
@@ -131,7 +135,6 @@ if ~options_.load_mh_file && ~options_.mh_recover
else
%% check for proper filesep char in user defined paths
PreviousFolder0
=
strrep
(
PreviousFolder0
,
'\'
,
filesep
);
PreviousFolder0
=
strrep
(
PreviousFolder0
,
'/'
,
filesep
);
MetropolisFolder0
=
[
PreviousFolder0
filesep
'metropolis'
];
[
~
,
ModelName0
]
=
fileparts
(
PreviousFolder0
);
record0
=
load_last_mh_history_file
(
MetropolisFolder0
,
ModelName0
);
...
...
@@ -159,7 +162,12 @@ if ~options_.load_mh_file && ~options_.mh_recover
options_
.
mh_nblck
=
NumberOfBlocks
;
end
if
~
isempty
(
PriorFile0
)
bayestopt0
=
load
(
PriorFile0
);
if
isempty
(
dir
(
PriorFile0
))
disp
(
'Estimation::mcmc: wrong value for mh_initialize_from_previous_mcmc_prior option'
)
error
(
'Estimation::mcmc: path to prior file is not found'
)
else
bayestopt0
=
load
(
PriorFile0
);
end
else
bayestopt0
=
load
([
PreviousFolder0
filesep
'prior'
filesep
'definition.mat'
]);
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment