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

Inconsistency in libsvm formats #1325

Merged
merged 2 commits into from
Jul 3, 2016
Merged

Inconsistency in libsvm formats #1325

merged 2 commits into from
Jul 3, 2016

Conversation

mhaseebtariq
Copy link
Contributor

I found out that when I trained a model using the distributed version of the JVM package - the libsvm format for the indexes has to be one-based ascending order. Whereas, when I used the saved model in the Python package it expected the libsvm format to be zero-based - which resulted in different predictions in the Python package. To work around this you have to modify your libsvm format accordingly.

@tqchen
Copy link
Member

tqchen commented Jul 3, 2016

Mainly due to the fact that spark does the internal conversion, and do not accept format that are 0-based. So the labeledVector transformed from spark's input was already transformed. While xgboost itself do not run any transformation

@mhaseebtariq
Copy link
Contributor Author

@tqchen Thank you for the clarification. So this should be mentioned in the README, right? I spent some time before realizing this - as I was getting very different results while using the saved model (distributed training) in the Python package. I think mentioning this somewhere might help new users. I have made another change in README with your clarification.

@tqchen tqchen merged commit 14f9697 into dmlc:master Jul 3, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants