How to using bayesopt function for a GP model

조회 수: 2 (최근 30일)
zhikun ruan
zhikun ruan 2019년 6월 20일
댓글: zhikun ruan 2019년 6월 22일
Hi, I need to use bayesopt function for a GP model but it returns NaN and Error. I used the code below and the x is a 2 * n matrix and y is a 1*n matrix. Can anyone help me?
num = optimizableVariable('n',[1,10],'Type','integer');
dst = optimizableVariable('dst',{'chebychev','euclidean','minkowski'},'Type','categorical');
results = bayesopt(@(params)fitrgp(x',y,'Sigma',0.1),[num,dst],'Verbose',0,...
'AcquisitionFunctionName','expected-improvement-plus')

채택된 답변

Don Mathis
Don Mathis 2019년 6월 21일
It looks like you're basing your code on this example, which is a good starting point: https://www.mathworks.com/help/stats/bayesopt.html?searchHighlight=bayesopt&s_tid=doc_srchtitle#bvamydy-2
But it seems you removed some important parts, like the call to kfoldLoss for example.
I would recommend starting with that example and making incremental changes to turn it into a solution to your problem. And reading the bayesopt documentation.
  댓글 수: 1
zhikun ruan
zhikun ruan 2019년 6월 22일
Thanks Don. I found your answers in other problems are very helpful. Thank you very much.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by