Menu

#93 `stk_model_gpposterior` fails to detect that lognoisevariance must be estimated

2.6
closed
nobody
None
2018-10-04
2018-10-04
Julien Bect
No

The following snippet fails to produce the expected result:

x = [ 1.00  1.50  2.00  3.00  5.00  7.00  10.00  13.00  18.00]';
z = [ 0.06  0.06  0.05  0.05  0.04  0.04   0.04   0.04   0.03]';

gp_prior = stk_model (@stk_materncov52_iso);
gp_prior.lognoisevariance = nan;  % assume noisy data
gp_posterior = stk_model_gpposterior (gp_prior, x, z);

x_box = stk_hrect([0; 20], {'t'});
x_pred = stk_sampling_regulargrid (100, [], x_box);
z_pred = stk_predict (gp_posterior, x_pred);

stk_plot1d (x, z, x_pred, [], z_pred);  legend show

The reason is that gp_posterior.prior.lognoisevariance is still NaN, because stk_model_gpposterior fails to detect that this parameter must be estimated too.

This is easy to fix.

Discussion

  • Julien Bect

    Julien Bect - 2018-10-04
    • status: open --> closed