LightGBM feature Importances
In Spark, we can get the feature importances from GBT and Random Forest. Can we do the same with LightGBM ?
Also looking for same information. Not sure whether LightGBMClassificationModel provides an API for accessing such information.
@bigdataexplorer @ywskycn yes, this is definitely possible to do, we just need to add the functionality
Anything I can help ?
@imatiach-msft does light GBM provide this API? If not this might be a bigger add
@mhamilton723 yes it does, it should be simple to add
I think we can just add a new API in LightGBMBooster, calling LGBM_BoosterFeatureImportance() in c_api.cpp.
@bigdataexplorer @rohanmonga @ywskycn @mhamilton723 I added a PR here for feature importances in LightGBM: https://github.com/Azure/mmlspark/pull/333
@bigdataexplorer @rohanmonga @ywskycn @mhamilton723 the PR has been checked in so closing this issue - it will be in the next release (0.14) or you can use the latest custom build:
--packages com.microsoft.ml.spark:mmlspark_2.11:0.13.dev0+1.ga8e702f --repositories https://mmlspark.azureedge.net/maven
thank you!
Thanks alot @imatiach-msft ! I will give it a try.
Hey guys, for pyspark LightGBM (mmlspark.lightgbm), getFeatureImportances only returns a list of values, but they don't map to the feature names, is there a workaround of that?
@imatiach-msft for PySpark getFeatureImportances, is there a workaround for returning a dict of feature names and values vs. just returning a list of values?