I am training a linear SVM classifier with the fitcsvm function in MATLAB using different kernels (with flag 'kernelfunction').
My training set consists of a list of 1x3 vectors, each one of them is labels 1,-1.
At first I was using a regular rbf kernel: exp(-gamma * pdist2(x1,x2)).
Now I want to change the distance function to a geodesic distance, which requires me to have 1x3 data points in the 'kernelfunction'.
Unfortunately, the data points that are transferred to the kernel function are automatically changing to 1x2 so I can't use the required distance function.
Does any one know how can I create a rbf geodesic kernel? I can't find a way to transfer the raw data points to the kernel function.
Thank You.
question from:
https://stackoverflow.com/questions/65925148/svm-using-fitcsvm-with-custom-kernel 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…