Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different probability estimates obtained from Matlab running on Unix and Windows #176

Open
yaoyang1 opened this issue Jul 6, 2021 · 5 comments

Comments

@yaoyang1
Copy link

yaoyang1 commented Jul 6, 2021

Hi, I tried to run 'svmtrain' with the same training data on both Ubuntu(64bit) and Windows(64bit). My MATLAB on both is R2020b(64bit). The SVM models derived were exactly the same. However, I got different probability estimates (i.e., model.ProbA and model.ProbB). The code follows.

t=2; c=1; g=1; b=1;
cmd=['-t ',num2str(t) , ' -c ', num2str(c), ' -g ', num2str(g), ' -q -b ', num2str(b)];
model=svmtrain(y, x, cmd);
display(model.ProbA,'A')
display(model.ProbB,'B')

'x' is the input and 'y' is the output. Both are of type double.
Thank you.

@cjlin1
Copy link
Owner

cjlin1 commented Jul 6, 2021 via email

@yaoyang1
Copy link
Author

yaoyang1 commented Jul 6, 2021

Thank you for the quik response. I understand the 5-fold CV procedure. I trid to repeatedly run the same code several times on the same platform, say Win10, but the results (probability estimates) did not change. I'm not sure if there is a initialization procedure of the random number generator in your code. Anyway, I think this might not be the reason why I got different results from the same code on Ubuntu and Windows. Do you have any other ideas why this could happen?

@yaoyang1
Copy link
Author

yaoyang1 commented Jul 6, 2021

FYI, I'm using the same libsvm version, i.e. libsvm 3.25.

@cjlin1
Copy link
Owner

cjlin1 commented Jul 6, 2021 via email

@yaoyang1
Copy link
Author

yaoyang1 commented Jul 7, 2021

Got it. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants