Filter out non-fully calibrated model when use_calibration is used with ML

Required after 9557142cc4.
Closes #849
time-shift
Johannes Pfeifer 2015-07-31 11:15:31 +02:00
parent a4db6f9be8
commit 64889b7335
1 changed files with 5 additions and 1 deletions

View File

@ -301,7 +301,11 @@ else
estim_params_.full_calibration_detected=0;
end
if options_.use_calibration_initialization %set calibration as starting values
[xparam1,estim_params_]=do_parameter_initialization(estim_params_,xparam1_calib,xparam1); %get explicitly initialized parameters that have precedence to calibrated values
if ~isempty(bayestopt_) && all(bayestopt_.pshape==0) && any(all(isnan([xparam1_calib xparam1]),2))
error('Estimation: When using the use_calibration option with ML, the parameters must be properly initialized.')
else
[xparam1,estim_params_]=do_parameter_initialization(estim_params_,xparam1_calib,xparam1); %get explicitly initialized parameters that have precedence to calibrated values
end
end
if ~isempty(estim_params_) && ~all(strcmp(fieldnames(estim_params_),'full_calibration_detected'))