pyLightGBM
pyLightGBM copied to clipboard
fix predict on ubuntu
I had a problem with getting results from the trained model. I always got an empty array as result from predict method. After that, I checked logs of ipython notebok, and find this info: [LightGBM] [Fatal] input format error, should be LibSVM It was very strange. I start to use LightGBM without your python wrapper, and the error still. Then, I looked Microsoft tutorial and noticed that they used tsv(https://raw.githubusercontent.com/Microsoft/LightGBM/master/examples/binary_classification/binary.train). Maybe now they have no so good support for libsvm format. And after changing data format in predictions phase to csv, error disappear all work fine.
The bug with SVM format has been fixed by Microsoft, now you can try one more time to run your script (but before update LigthGBM and pyLigthGBM).
And from my point of view using svmlight fromat is better, because we can provide sparse data in this way.