フィルターのクリア

I keep getting the error: Error in Assignment7_1 (line 11) hyp2 = minimize(hyp, @gp, -100, @infGaussLik, meanfunc, covfunc, likfunc, x, y); when I run a code.

1 回表示 (過去 30 日間)
Joseph Ikogho
Joseph Ikogho 2021 年 11 月 24 日
回答済み: Yongjian Feng 2021 年 11 月 24 日
%GP example
meanfunc = []; % empty: don't use a mean function
covfunc = {@covSum,{@covLIN,@covConst}}; % Linear covariance function
likfunc = @likGauss; % Gaussian likelihood
hyp = struct('mean', [],'cov', 0, 'lik', -1);
N=50;
x=rand(N,1);
y=0.5*x+0.5+0.1*randn(size(x));
hyp2 = minimize(hyp, @gp, -100, @infGaussLik, meanfunc, covfunc, likfunc, x, y);
Check for incorrect argument data type or missing argument in call to function 'minimize'.
xs=(0:0.1:1)';
[mu, s2] = gp(hyp2, @infGaussLik, meanfunc, covfunc, likfunc, x, y, xs);
  1 件のコメント
Joseph Ikogho
Joseph Ikogho 2021 年 11 月 24 日
Please any help with the solution to this error will be appreciated. Thanks

サインインしてコメントする。

回答 (1 件)

Yongjian Feng
Yongjian Feng 2021 年 11 月 24 日
The last line calling minimize, which function do you want to call? Are you calling one of the built-in functions or a custom function you wrote? There seems like confusion there.

カテゴリ

Help Center および File ExchangeModeling についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by