How to using bayesopt function for a GP model
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
zhikun ruan
le 20 Juin 2019
Commenté : zhikun ruan
le 22 Juin 2019
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')
0 commentaires
Réponse acceptée
Don Mathis
le 21 Juin 2019
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.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Model Building and Assessment dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!