how can I save the verbose output from fitrgp?

조회 수: 3 (최근 30일)
Francisco
Francisco 2021년 12월 1일
답변: Pratik 2024년 2월 15일
I am running fitrgp with optimization options as following:
gprMd3 = fitrgp(x,y,'KernelFunction','squaredexponential',...
'OptimizeHyperparameters','auto','HyperparameterOptimizationOptions',...
struct('AcquisitionFunctionName','expected-improvement-plus'));
and I get the following table with two plots: one plot for the objective function model, and other plot for Min objective vs. Number of function evaluations
The table I get is:
|======================================================================================|
| Iter | Eval | Objective: | Objective | BestSoFar | BestSoFar | Sigma |
| | result | log(1+loss) | runtime | (observed) | (estim.) | |
|======================================================================================|
| 1 | Best | 0.0023244 | 83.433 | 0.0023244 | 0.0023244 | 0.00013322 |
| 2 | Accept | 0.009627 | 38.782 | 0.0023244 | 0.0027615 | 0.15882 |
| 3 | Accept | 0.0025183 | 56.103 | 0.0023244 | 0.004802 | 0.01944 |
| 4 | Accept | 0.0024726 | 79.114 | 0.0023244 | 0.0042355 | 0.0017215 |
| 5 | Accept | 0.0025118 | 76.332 | 0.0023244 | 0.0023272 | 0.00014478 |
I would like to save this numbers or access to them. So that I can reproduce the two plots above.
Is there a way to do it?
Thank you!

답변 (1개)

Pratik
Pratik 2024년 2월 15일
Hi Franisco,
From what I can understand, the verbose output from ‘fitgrp’ must be saved so that the plots can be reproduced.
In MATLAB, you can capture the verbose output of the ‘fitrgp’ function's hyperparameter optimization by setting the Verbose option to 1 or 2 in the ‘HyperparameterOptimizationOptions’ structure. Additionally, to save the detailed optimization information, you can set the ‘SaveIntermediateResults’ field to true. This will allow you to access the optimization history, including all the intermediate results.
Please refer to the table in the following documentation for more information:
I hope this helps!

카테고리

Help CenterFile Exchange에서 Gaussian Process Regression에 대해 자세히 알아보기

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by