Can anyone help me to apply RBF kernel function in matlab and how to write its equation?
14 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MINO GEORGE
am 10 Mai 2021
Kommentiert: MINO GEORGE
am 12 Mai 2021
The equation is K(X,X') = exp(-||X-X'||2/2sigma2). Any help is appreciated
0 Kommentare
Akzeptierte Antwort
the cyclist
am 10 Mai 2021
Bearbeitet: the cyclist
am 10 Mai 2021
% Define sigma
sigma = 0.4;
% Define the function
K = @(x1,x2) exp(-sum((x1-x2).^2)./(2.*sigma.^2));
% Apply the function to two vectors
K([1; 2; 3],[1; 2; 4])
(I think I got the norm part coded right, but you should double-check that because I didn't.)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Image Processing Toolbox 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!