Fix computation of objective function in OSR if covariances are specified
Due to the preprocessor adding entries for all variable combination into i_var, variables contained in covariances obtained a wrong weighting. By only selecting the unique entries, this cannot happen anymore. Moreover, the computation intensity of the objective does not increase quadratically in the objective anymore.time-shift
parent
9300a061aa
commit
ecbe428bd7
|
@ -77,6 +77,8 @@ H0 = 1e-4*eye(np);
|
|||
crit=options_.osr.tolf;
|
||||
nit=options_.osr.maxit;
|
||||
|
||||
%extract unique entries of covariance
|
||||
i_var=unique(i_var);
|
||||
%% do initial checks
|
||||
[loss,vx,info,exit_flag]=osr_obj(t0,i_params,inv_order_var(i_var),weights(i_var,i_var));
|
||||
if info~=0
|
||||
|
|
Loading…
Reference in New Issue