Xtra-Computing / thundergbm

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

ThunderGBM in Google Colab? #38

Closed vprelovac closed 2 years ago

vprelovac commented 4 years ago

Lookin for a way to run this in Google Colab environment, thanks.

Kurt-Liuhf commented 4 years ago

Hi @vprelovac , can you install ThunderGBM in Google Colab through command !pip install thundergbm? We have not tried running our library in Colab yet, but we encourage you to have a try and give us some feedback! Thank you!

vprelovac commented 4 years ago

Yes, and it doesn't work. Colab had huge community of ML users and I suggest that you include it as part of testing.

kirimaru-jp commented 4 years ago

@Kurt-Liuhf It works for me, with the following example, adapted from sklearn

from thundergbm import TGBMClassifier
clf = TGBMClassifier(depth=2)
from sklearn.datasets import make_classification
X, y = make_classification(n_samples=1000, n_features=4,
                           n_informative=2, n_redundant=0,
                           random_state=0, shuffle=False)
clf.fit(X, y)

z = clf.predict(X[:20,]**2)
z

Results:

array([0., 0., 0., 0., 1., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0.,
       0., 0., 0.])