linkedin / FastTreeSHAP

Fast SHAP value computation for interpreting tree-based models
BSD 2-Clause "Simplified" License
512 stars 31 forks source link

Catboost improvement negligible? #6

Closed nilslacroix closed 2 years ago

nilslacroix commented 2 years ago

Using a CatBoostRegressor() with your provided notebooks and the semiconductor dataset, I did not see any improvements regarding computing the shap files. Do you have any data on this regarding speed up or did I make a mistake? I did not find any information on this in the paper or blogpost.

Also how does fasttreeshap handle GPU support?

Code used:

cat =CatBoostRegressor(iterations=2000, task_type="CPU")#, devices="0-1")
cat.fit(train, label_train)

run_fasttreeshap(
    model = cat sample = test, interactions = False, algorithm_version = "v0", n_jobs = n_jobs,
    num_round = num_round, num_sample = num_sample, shortcut = False)

run_fasttreeshap(
    model =cat, sample = test, interactions = False, algorithm_version = "v1", n_jobs = n_jobs,
    num_round = num_round, num_sample = num_sample, shortcut = False)
jlyang1990 commented 2 years ago

Hi,

CatBoost is not supported in the current version of fasttreeshap. As mentioned in the section "Usage" in the README file, "Note that currently shortcut is automatically set to be True for CatBoost model, as we are working on CatBoost component in FastTreeSHAP package." CatBoost may be supported in the later version of fasttreeshap.

Also the current version of fasttreeshap is designed for CPU usage only. Enabling GPU support for fasttreeshap is also in our future roadmap.

Let me know if you have further questions.