How to set arguments of 'fitrgp' while using 'bayesopt'?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Mengshuo Wang
am 5 Mär. 2017
Kommentiert: Don Mathis
am 24 Mär. 2017
'bayesopt' uses 'fitrgp' to fit GP regression model. However, it seems that 'bayesopt' does not provide an interface to set the arguments of the inner 'fitrgp'. How can I set these arguments?
To be more specific, is it possible to force 'fitrpg' to use 'sr' as 'FitMethod' when using 'bayesopt'?
0 Kommentare
Akzeptierte Antwort
Don Mathis
am 23 Mär. 2017
You're right that bayesopt doesn't provide an interface for that. If you're willing to modify a source code file it can be done pretty easily. Go to line 3118 of BayesianOptimization.m
>> edit BayesianOptimization.m
It's in the function 'iFitrgpRobust'. The line looks like this:
GP = compact(fitrgp(X, Y, varargin{:}, 'SigmaLowerBound', SigmaLowerBound));
You can then add arguments to the end of this argument list. Suppose you wanted to use fitmethod 'sd' with an active set size of 300. You could do this:
GP = compact(fitrgp(X, Y, varargin{:}, 'SigmaLowerBound', SigmaLowerBound, ...
'FitMethod', 'sd', 'ActiveSetSize', 300));
By the way, would you mind sharing your reason for wanting to do this? I have a guess but I would like to hear from you. Thanks.
2 Kommentare
Don Mathis
am 24 Mär. 2017
That was my guess :-). Your solution is exactly what I would recommend -- Use SD and set the active set size to some value that is fast enough for your problem. That number will depend on your problem, so you'll need to adjust it for each problem. I have used this technique and I find it works well.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Model Building and Assessment finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!