Xtra-Computing / thundergbm

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

Output of multi:softprob is probably wrong #79

Closed ooghry closed 1 year ago

ooghry commented 1 year ago

I'm trying to tune ThunderGBM with Optuna with these parameters:

        param = {
            "verbose": 1,
            "num_class":3,
            "objective": "multi:softprob",
            "depth": trial.suggest_int("depth", 5, 28),
            # "n_trees": trial.suggest_int("n_trees", 40, 4000),
            "max_num_bin":trial.suggest_int("max_num_bin", 128, 1024),
            "column_sampling_rate": trial.suggest_float("column_sampling_rate", 0.001, 1.0),
            "learning_rate": trial.suggest_float("learning_rate", 1e-4, 1, log=True),
            "min_child_weight": trial.suggest_int("min_child_weight", 1, 200),
            "lambda_tgbm": trial.suggest_float("lambda_tgbm", 1e-8, 10, log=True),
            "gamma": trial.suggest_float("gamma", 1e-8, 300, log=True),
            "tree_method": trial.suggest_categorical("tree_method", ["exact", "hist"]),
        }

I expected the shape of the output of predict method to look like this shape (3430,3), but it's:

shape (3430,)
predictions [0.33364683 0.3327553  0.33512658 ... 0.33053941 0.33373269 0.33816108]

It's very looks like multi:softmax output:

(3430,)
[1. 0. 0. ... 2. 2. 2.]
Kurt-Liuhf commented 1 year ago

I am working on the compiling environment now. Will get back to you as soon as possible. Thanks for your understanding.

Kurt-Liuhf commented 1 year ago

Hi @ooghry, this issue is fixed. Please reinstall the library and give a test. Thank you.

ooghry commented 1 year ago

Thank you @Kurt-Liuhf I can not test latest version because I'm trying to run ThunderGBM needs GLIBC 2.29 on Google colab (ldd (Ubuntu GLIBC 2.27-3ubuntu1.5) 2.27). So feel free to close the issue.

zeyiwen commented 1 year ago

Thanks. Please feel free to reopen it or open new issues, if you encounter problems using ThunderGBM.