Open seijikun opened 4 years ago
Hello,
I try to reproduce by your files but I get parallelAccuracy=0.5 in Matlab. Could you please provide the decision values in both normal and parallel cases?
Sure! Here are the stored svmModel
s:
svmModels.tar.gz
Some system-information: Operating-System: Linux openSUSE Tumbleweed Octave: 5.1.0 Matlab: R2019a Update 5 (9.6.0.1174912) 64-bit (glnxa64) libsvm: 3.24 gcc: 9.2.1 20190820 [gcc-9-branch revision 274748]
Sorry, maybe I didn't make myself clear. For decision values, I mean:
[predicted_label, accuracy, decision_values/prob_estimates] = svmpredict(testing_label_vector, testing_instance_matrix, model [, 'libsvm_options']);
(you can see it in matlab/README)
When I run your code, I get the same decision_values
in parallel as normal. So the parallelAccuracy is 0.5, the same as normalAccuracy. Please compare your decision values in normal and parallel to make sure what leads the weird output.
In addition, I did check your provided models and found they look good. But since you said you only applied OpenMP in prediction, I think it's normal that we can get the same models. If there is something wrong, it may happen on svmpredict()
. That's why I want to see the decision values you generate.
Oh, I'm sorry, I misunderstood! Here they are: predictResults.tar.gz
Hello,
Your decision values in parallel seem abnormal. Since we cannot reproduce your case, it's hard to make a conclusion where is wrong. We recommend you to substitute C for Matlab to avoid other influences. If your result still seems weird, we are pleased to discuss with you.
I see very weird behavior when applying OpenMP as stated in the FAQ, in combination with one-class-SVMs.
When I train a one-class SVM with OpenMP in Matlab, I get a different accuracy (way better) than when I train the one-class SVM without OpenMP. However, when using Octave, I get the same results in both cases.
Accuracy-Results(Matlab):
Accuracy-Results(Octave):
I added a complete example-project for reproduction: libsvmtest.tar.gz The FAQ only mentions
SVC_Q::get_Q
andSVR_Q::get_Q
to apply the OpenMP pragmas, so I did not apply it onONE_CLASS_Q::get_Q
for this experiment. OpenMP is therefore only used for the prediction.