Xtra-Computing / thundersvm

ThunderSVM: A Fast SVM Library on GPUs and CPUs
Apache License 2.0
1.56k stars 216 forks source link

Prediction probability #132

Closed Rafid013 closed 5 years ago

Rafid013 commented 5 years ago

Hi, For the same training parameters, there is a huge difference between the predictions of thundersvm (python) and scikit-learn. I have used standard scaler in both cases to scale the data. Accuracy was calculated using accuracy_score of sklearn. I also checked the probability values returned by both sklearn and thundersvm model which are different. The probability values are attached.

thunder_proba.txt sklearn_proba.txt

zeyiwen commented 5 years ago

Would you share your data set and python code with us? We need a minimum example to reproduce the problem and fix this issue.

Rafid013 commented 5 years ago

No, it's okay. I made a very silly mistake. Nothing to do with thundersvm. Although I have another question, how does the predict_proba method return probabilities for binary classification? Is it exactly like sklearn (ordered classes, class 0 in first column, class 1 in second column)? Or does it depend on the order the classes appear in the training dataset?

QinbinLi commented 5 years ago

Hi, @Rafid013 It depends on the order the classes appear in the training dataset.

Rafid013 commented 5 years ago

Thanks