필터 지우기
필터 지우기

custom kernel for GPR

조회 수: 4 (최근 30일)
Urmila Datta
Urmila Datta 2022년 2월 18일
답변: Kausthub 2024년 2월 1일
I have written custom kernel for GP regression with sum of squaredexponential+whitenoise and a constant.
Working perfect when predicting the same input after gpfit. But when I upsampled the input,it is showing Arrays have incompatible sizes for this operation. But when I correct the matrix size by breaking with dbstop error, it shows error in predict and showing Error using * . Attaching my custom kernel fuction.

답변 (1개)

Kausthub
Kausthub 2024년 2월 1일
Hi Urmila,
I believe that you are facing an error while upsampling the input and passing it to the custom kernel for GPR. Since, you have upsampled the input, the dimensions of the input changes and leads to the "Arrays have incompatibe sizes for this operation" error. From the error message I believe that it looks like a case of dimension mismatch for the matrix multiplication operation ‘*’. I would suggest you to:
1) Cross check the dimensions of your arrays and ensure that their dimensions are compatible for the matrix multiplication operation. Below mentioned are some documentations that might be useful for you apart from using breakpoints to solve the issue:
2) Cross check whether you actually wanted to do an element wise multiplication instead of a matrix multiplication. Here is a reference to a MATLAB Answer with the exact error message which might be helpful:
Hope it helps!

카테고리

Help CenterFile Exchange에서 Signal Operations에 대해 자세히 알아보기

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by