I am trying to train a SVM model for binary classification using example dependent cost sensitive learning but every time I am getting an error of segmentation fault. The format of the cost matrix csv file I gave is as follows:
FP
FN
TP
TN
i.e. all 4 params are in new line. I want to know is this correct format? If correct, can you suggest why I am getting an error of segmentation fault. The command I am using for model training is as follows:
svm-train -C 2 -W cost_matrix.csv feature_matrix.csv
One more question I would like to add here is that I didn't fine the proper documentation for python interface of cost-sensitive SVM (cssvm) model. The reason behind using its python interface (instead of its pre-compiled package) is that I want to get detailed performance measure such as weighted accuracy, f1-score, weighted f1-wcore, ROC, AUC, precision, recall etc. I tried running the python interface of cssvm from file cssvm.py using the following command
python2 -c "from cssvm import *"
I get an error of no module named libsvm. Then I installed python2.7 version of libsvm using the following command
sudo apt-get install -y python2.7-libsvm
then I get an error of
AttributeError: /usr/lib/libsvm.so.3: undefined symbol: svm_get_sv_indices
Kindly suggest how to use the python interface of cssvm with proper examples. Thanks.
I am trying to train a SVM model for binary classification using example dependent cost sensitive learning but every time I am getting an error of segmentation fault. The format of the cost matrix csv file I gave is as follows:
FPFNTPTNi.e. all 4 params are in new line. I want to know is this correct format? If correct, can you suggest why I am getting an error of segmentation fault. The command I am using for model training is as follows:
svm-train -C 2 -W cost_matrix.csv feature_matrix.csvOne more question I would like to add here is that I didn't fine the proper documentation for python interface of cost-sensitive SVM (cssvm) model. The reason behind using its python interface (instead of its pre-compiled package) is that I want to get detailed performance measure such as weighted accuracy, f1-score, weighted f1-wcore, ROC, AUC, precision, recall etc. I tried running the python interface of cssvm from file
cssvm.pyusing the following commandpython2 -c "from cssvm import *"I get an error of no module named
libsvm. Then I installed python2.7 version of libsvm using the following commandsudo apt-get install -y python2.7-libsvmthen I get an error of
AttributeError: /usr/lib/libsvm.so.3: undefined symbol: svm_get_sv_indicesKindly suggest how to use the python interface of cssvm with proper examples. Thanks.