References of LIBSVM: Official implementation document: C.-C. Chang and C.-J. LIBSVM: a library for support vector machines. ACM Transactions on Intelligent Systems and Technology, 2:27:1-27:27, 2011. Pdf, ps.gz, ACM digital lib. Instructions for using LIBSVM are in the README files in the main directory and some sub-directories. Dec 25, 2013. Install libsvm on Mac OSX. June 23, 2017 Amber. About the App. App name: libsvm; App description: Library for support vector machines. I need to use a function designed to provide ARMA-Garch-in-Mean estimation in matlab and I found a code online in a mex file. Thing is I don't know what to do next in order to use this function in matlab. I am a mac user and don't even know how to set mex files in matlab for mac. Execute the make command inside matlab Error: make i686-apple-darwin10-gcc-4.2.1: svm.obj: No such file or directory i686-apple-darwin10-gcc-4.2.1: svmmodelmatlab.obj: No such file or directory mex: link of ' 'svmtrain.mexmaci64' failed.???
Tutorials on installation of libsvm for matlab on mac could be fetched easily on the internet. However, most of them did not mention some problems that could be met during the installation. Therefore, I’d like to make a more comprehensive version of tutorial.
My environment is like:
Mac OS X 10.9
Xcode 5
Matlab R2012b
Xcode 5
Matlab R2012b
Step 1.Preparation
Of course, you have to download libsvm from its official site: http://www.csie.ntu.edu.tw/~cjlin/libsvm/index.html. There is no versions specially for matlab, so, just download the package.
You could unzip the package to any directory you like, but I’d prefer to unzip it to (matlabroot)/toolbox/libsvm.
Step 2.Make Compile
After preparation, launch matlab and go to the directory you unzipped the files to. For me, it will be like:
Now, we need to compile. Just type the following command:
If everything goes right, just wait for a few seconds, it will be done and nothing will be displayed. Calendar 366 ii v2 4 1 download free. You will find some files with the suffix .mexmaci64.
Unfortunately, I went into trouble during the process.
Step 3.Troubleshooting
If anything goes wrong, try the following command first:
This one let you to choose a proper compiler. Depending on the environment, things like following will be prompted to the screen:
After all this, try Step 2 again. If it doesn’t work, read on.
Libsvm Matlab Tutorial
Well, in fact, after typing make into the command line, I met the following error message:
According to the MathWork,
/Applications/MATLAB_R2011b.app/bin/mex: line 305: gcc-4.2: command not found
This is happening because MATLAB is expecting GCC 4.2 to be present. This compiler was distributed with Xcode 4.0 and 4.1, but is no longer supplied as of Xcode 4.2.However, Xcode 4.2 and later include a similar compiler (GCC 4.2 front-end to LLVM) that MATLAB can be instructed to use instead. Applying the patch attached to this solution will instruct MATLAB to use the compiler supplied with Xcode 4.2 or later.
And you should find the patch and its installation instructions here: http://www.mathworks.com/matlabcentral/answers/94092
You may notice that in the support article above, it is said that the solution is only for Xcode 4.2~2.4 with OS X 10.6~10.8. But, in fact, even if you are in OS X 10.9 with Xcode 5, the problem is aroused for the same reason and the solution should be the same. Therefore, don’t worry if you are not in the environment mentioned in the article above.
Meanwhile, there is another issue mentioned in the article that you may encounter during the installation process:
Step 4. Testing
As everything goes right now, we should test if libsvm works fine. Download the heart_scale dataset from here: http://www.csie.ntu.edu.tw/~b91082/SVM/ and move it into your current work directory. Paragraphs 1 1 4 download free. Then:
If your output match the output above, then congratulations, you could use the libsvm now.
Some Further Info
If you succeed the step 4, you could use libsvm. However, if your work directory doesn’t contain the .mexmaci64 files, you may find the svmtrain and svmpredict works a little bit unexpectedly. That is because the libsvm is not in your search path and matlab automatically called the original system svmtrain/svmpredict. What you should do is to add the libsvm to your search path by typing:
and add the libsvm/matlab to the path.
Meanwhile, if you try to use help or doc commands to get the help information about the two functions, what you will get are the documentations of the system implementation of the two functions instead of libsvm version. And the system version could be not so easy to use. If you want to check the documentation of libsvm, just refer to the README file in the libsvm/matlab directory.
Libsvm Matlab Code
OK, that’s all about it. This is the first time I write a so called “tutorial” and I do hope it will do a little bit help to you.