Xtra-Computing / thundergbm

ThunderGBM: Fast GBDTs and Random Forests on GPUs
Apache License 2.0
692 stars 87 forks source link

prediction result #8

Closed xingyuezhiji closed 5 years ago

xingyuezhiji commented 5 years ago

为什么y_predict=clf.predict(x,y)后输出y_predict结果是none

xingyuezhiji commented 5 years ago

代码如下:

x,y = load_svmlight_file("./thundergbm/dataset/test_dataset.txt")
clf = TGBMModel()
clf.fit(x,y)
y_predict=clf.predict(x,y)

print(y_predict)
zeyiwen commented 5 years ago

Thanks for the feedback! We have fixed the problem. Please pull the latest code, recompile it, and run it again.

xingyuezhiji commented 5 years ago

Thanks for the feedback! We have fixed the problem. Please pull the latest code, recompile it, and run it again.

新的代码预测结果全是0,感觉也不对啊

print(y_predict,y_predict.sum())

and the result return [0. 0. 0. ... 0. 0. 0.] 0.0

zeyiwen commented 5 years ago

Would you share your machine environment (e.g., CUDA version, GPU, OS, etc.)? And dataset if you are not using test_dataset.txt. This will help us reproduce the problem.

Also, please use English, so that other users in the community and contributors may help fix this issue.

xingyuezhiji commented 5 years ago

CUDA Version 9.1.85, OS:ubuntu16.04, GPU1080Ti, and dataset is test_dataset.txt.

xingyuezhiji commented 5 years ago

CUDA Version 9.1.85, OS:ubuntu16.04, GPU1080Ti, and dataset is test_dataset.txt.

I have solved it, thanks a lot!

zeyiwen commented 5 years ago

Sounds cool. If there is anything needed to be improved, please let us know or even better, contribute to the project :)