dislib icon indicating copy to clipboard operation
dislib copied to clipboard

C-SVM predict not deterministic

Open javicid opened this issue 6 years ago • 1 comments

In rare cases, C-SVM predict returns different labels for the same data.

This happens especially in CSVMTest.test_sparse, which compares the labels returned by predict when using sparse and dense data structures. Although the computed support vectors and dual coefficient are equal in both cases, the resulting labels differ sometimes. I have been able to replicate the behavior also using the same dense dataset twice, so I don't think the problem comes from using sparse data.

The issue could be some unexpected randomness in scikit-learn SVC, or maybe a bug in PyCOMPSs, as the test_sparse function raises serialization errors occasionally, even when the execution succeeds.

javicid avatar Jan 30 '19 17:01 javicid

For the moment, I will change test_sparse so that it checks the computed support vectors and dual coefficients instead of the labels.

javicid avatar Jan 30 '19 17:01 javicid