objective function in Bayesian Optimization Algorithm like fitrsvm and fitrgp

Hello,
What is the mathematical objective function in the bayesian optimization algorithm? The explanation says that the algorithm like fitrsvm tries to minimize the log(1 + cross-validation loss) but what is the real mathematical formula?
Is it possible to change the objective function to just the MSE?
Thank you!
Dimitri

 採用された回答

Don Mathis
Don Mathis 2019 年 5 月 13 日

0 投票

This page says that the loss defaults to MSE. So that's the loss that's used in the log(1+cvloss) formula. Cross validated loss is the loss summed over all the held-out validation sets. The default when using optimization is 5-fold cross-validation.
There's not an option to change the hyperparameter optimization objective function from log(1+cvloss). You would need to edit the source code to do that. The source file is matlab\toolbox\stats\classreg\+classreg\+learning\+paramoptim\createObjFcn.m. Look for the call to the log1p function.

3 件のコメント

Dimitri
Dimitri 2019 年 5 月 14 日
Hello,
Thank you for your answer. Let´s take this example. The Mdl.HyperparameterOptimizationResults.MinObjective is 2.8666. If I take the Mdl and use L=loss(Mdl,X,Y) the loss is 16.1764. If I compute the log1p(L)=2.8435. Why is there a difference in the results?
Don Mathis
Don Mathis 2019 年 5 月 14 日
編集済み: Don Mathis 2019 年 5 月 14 日
Because loss(Mdl,X,Y) is the loss of the final model on the full dataset, while the MinObjective is the log of 1 plus the out-of-sample cross-validated loss. See the kfoldLoss method for documentation of that. If you used 5-fold cross-validation, the kfoldLoss is the summed loss of 5 different models, each on 1/5 of the dataset. It is not the loss of the final model on the full dataset.
antlhem
antlhem 2021 年 5 月 29 日
Hi, Could take a look into my question? https://uk.mathworks.com/matlabcentral/answers/842800-why-matlab-svr-is-not-working-for-exponential-data-and-works-well-with-data-that-fluctuates?s_tid=prof_contriblnk

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

その他の回答 (0 件)

カテゴリ

製品

リリース

R2019a

質問済み:

2019 年 5 月 13 日

コメント済み:

2021 年 5 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by