Matlab keeps calling the wrong SVMtrain function
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi, I have a question about the svm train function. I have installed and done the make files using libsvm from the following website http://www.csie.ntu.edu.tw/~cjlin/libsvm/
However, when I call the function it gives me the following error in the files provided: Error using svmtrain (line 233) Y must be a vector or a character array.
Error in SVR_load_ver2 (line 107) model = svmtrain(lrndata.y, lrndata.X, param.libsvm);
After doing some research I realized that the statistics toolbox has a different svmtrain function with the same name and that is the one that was being called. I already have the libsvm files at the top of my paths.
Any possible solution would be greatly appreciated!
Thank you!!
2 Commenti
mehrose
il 18 Ago 2015
run the following command, you will find out which function is calling.
which -all svmtrain
then remove the lib you have added for svm. from the command line, add the path of your svm lib.
addpath your_lib_name
run the file. if the problem exists, try downloading the new version of lib, and try again. i have lib libsvm-mat-2.88-1. it doesnt work. i downloaded libsvm-3.20 with the above steps, it works!
Tung Nguyen
il 27 Nov 2016
Hi, I tried to addpath to a folder that contains my *.mexa64 files. But, Matlab keeps calling the default svmtrain.m file. I also tried to change the file name (svmtrain.m -> svmtrain_temp.m), and Matlab response:
Previously accessible file "/usr/local/MATLAB/R2016b/toolbox/stats/stats/svmtrain.m" is now inaccessible.
How can I force Matlab to choose the svmtrain in my .mex files?
Risposte (4)
the cyclist
il 11 Gen 2015
You can use the path command to see and change the path, which will determine which version of the function is "seen" first, and used.
0 Commenti
the cyclist
il 11 Gen 2015
You can use
which -all svmtrain
to identify all the instances of this function, and specify the complete path to the one you want, not relying on MATLAB's priority. This can be a bit cumbersome, though.
0 Commenti
Mubashir
il 16 Ago 2018
Just copy the 'svmtrain' function from LibSvm Matlab folder to your folder, from which you are calling a function. This works with my same problem.
0 Commenti
Abdul Ghaffar
il 20 Lug 2019
@all. I am also facing the same problem in 'svmtrain '.
"Error using svmtrain (line 230)
svmtrain has been removed. Use fitcsvm instead."
Please guide me how to resolve this issue.
I just download and can't do make files using libsvm from the following website http://www.csie.ntu.edu.tw/~cjlin/libsvm/
0 Commenti
Vedere anche
Categorie
Scopri di più su Downloads in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!