How can I disable "Optimize Numeric Parameters" in gaussian process regression?
23 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I'm performing a hyper-parameter optimization of a Gaussian Process Regression (GPR), and I've noticed that it runs in about 30 seconds in the Regression Learner App, but more like 70 seconds if I run a hopefully identical function in the workspace.
I've tried a lot of different settings in my custom function, but always it is much slower.
The only difference is that, in the learner app, there is an option called "Optimize Numeric Parameters" which, when set, makes the regression learner app run much more slowly (similar to function from workspace, if not even slower).
I find that the results are in fact superior with "Optimize Numeric Parameters" disabled, plus it runs much faster so I can do more iterations. How can I disable this in the function I wrote to train a GPR model?
1 commentaire
Umar
le 12 Juil 2024 à 1:21
Hi JP,
If I recall , you need to specify 'FitMethod' as 'none', this way you will be able to control the optimization process manually and disable the automatic optimization of numeric parameters in Gaussian Process Regression.
Réponses (1)
Divyam
le 15 Juil 2024 à 5:54
Hi JP,
If you are using the "fitgrp" function, you can disable the numerical parameter optimization by setting the "FitMethod" as "none". Here is a sample code to help you with the same.
% Example code taken from: https://www.mathworks.com/help/stats/fitrgp.html#butnoh6-2
% Generating sample data
rng(0,'twister');
n = 1000;
x = linspace(-10,10,n)';
y = 1 + x*5e-2 + sin(x)./x + 0.2*randn(n,1);
% Fitting the GRP Model using the "FitMethod" set as "none"
% The "PredictMethod" can be altered as per your requirements
gprMdl = fitrgp(x,y,'Basis','linear','FitMethod','none','PredictMethod','exact');
To get more information about using the Gaussian Process Regression Model in MATLAB, refer to this documentation: https://www.mathworks.com/help/stats/regressiongp.html
0 commentaires
Voir également
Catégories
En savoir plus sur Statistics and Machine Learning Toolbox 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!