pyLightGBM icon indicating copy to clipboard operation
pyLightGBM copied to clipboard

fix predict on ubuntu

Open niknoproblems opened this issue 8 years ago • 1 comments

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.

niknoproblems avatar Oct 30 '16 22:10 niknoproblems

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.

EBazarov avatar Oct 31 '16 16:10 EBazarov