Closed shijiashuai closed 7 years ago
Hi, this repository contains only the library, it doesn't contain any main function. If you want to simply use it to train SVM model from data in either LibSVM text file format or LASVM binary file format, you can use an application in repository https://github.com/OrcusCZ/SVMbenchmark, I've just slightly modified it to simply include OHD-SVM.
Clone SVMbenchmark repository and then clone OHD-SVM repository into OHD-SVM folder in SVMbenchmark root directory (you need to create OHD-SVM folder), so you end up with folder in path SVMbenchmark/OHD-SVM. Then use CMakeLists.txt from SVMbenchmark to generate project files or makefiles. You need to set cache variable COMPILE_WITH_OHDSVM to ON, CMake will then automatically include OHD-SVM project. You can also disable other SVM implementations using several predefined CMake cache variables, I suggest cmake-gui to configure the project to see all the variables.
Refer to SVMbenchmark git repository readme for information how to launch the application. Also note that to use OHD-SVM, you need to specify argument -i 16
on the command line. If you execute the application without arguments, help is displayed. Note that git readme is not up to date (implementation 16 is missing in readme but is in application help text). You may also specify arguments -t d
to treat data as dense for better training times, because all LibSVM text files are loaded by our application as sparse by default.
Thanks a lot for help. I've successfully made it run.
To get it run, I also modified a bit of codes in csr.cu
because the complier reported some errors.
My system environment is Ubuntu 16.04, gcc 5.4.0, cuda 8.0.
In csr.cu
:77,
std::sort(rowPerm.begin(), rowPerm.end(), IdxComparator<std::vector<int>>(&rowLen));
I modified it to
std::sort(rowPerm.begin(), rowPerm.end(), IdxComparator<std::vector<int> >(&rowLen));//add a space
hi, I am very interested in this project and want to try it. I've complied the project successfully in my computer but couldn't find how to run it. It seems that there should be a main method which reads training set and calls the
ohdSVM:Train()
inohdSVM.cu
. Could you please help me?