필터 지우기
필터 지우기

Problem training Gaussian process with 'ardsquaredexponential' kernel function using bayesopt

조회 수: 7 (최근 30일)
Dear community,
I have a problem training a Gaussian process using fitrgp. Can someone advise, why some datasets will produce errors when training with the command below. The training data set that is causing the error is in the attached mat-file.
gpr = fitrgp(X, y, ...
'KernelFunction', 'ardsquaredexponential',...
'PredictMethod', 'fic',...
'OptimizeHyperparameters', {'KernelScale','Sigma'},...
'HyperparameterOptimizationOptions',...
struct('MaxObjectiveEvaluations',250,...
'Optimizer', 'bayesopt',...
'Repartition', false,...
'UseParallel', true,...
'Kfold' , 5),...
'Verbose', 1,...
'OptimizerOptions', statset(...
'Display', 'final',...
'UseParallel', true));
The error that is returned reads
For the 'ARDSquaredExponential' kernel with 2 predictors, 'KernelParameters' must be a 3-by-1 vector of positive numbers.
and did not help me find a solution. (I already tried normalizing, more data, etc., but it did not work)
Best regards and thank you,
Robert

채택된 답변

Alan Weiss
Alan Weiss 2022년 3월 24일
As stated in the documentation for OptimizeHyperparameters:
"KernelScale cannot be optimized for any of the ARD kernels."
Alan Weiss
MATLAB mathematical toolbox documentation
  댓글 수: 4
Alan Weiss
Alan Weiss 2022년 4월 28일
I don't think so, but you can try setting the name (not function handle) of your user-defined kernel function as the kernel by using hyperparameters to set a nondefault kernel, as outlined on the fitrgp reference page in the HyperparameterOptimizationOptions section. I haven't tried this and don't know if it will work--I suspect not, but it might be worth a try.
Alan Weiss
MATLAB mathematical toolbox documentation
Rebecca Mazloum
Rebecca Mazloum 2024년 5월 28일
Hello,
How are the KernelScales chosen for ARD kernnels?
We notice that initial values given as KernelParameters change once the model is created.
Are the KernelScales optimized internally for ARD kernels? And if so using which method?
Thanks

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by