gbm-developers / gbm3

Gradient boosted models
135 stars 115 forks source link

Add option to export sparse matrix of decision tree rules #146

Open gravesee opened 7 years ago

gravesee commented 7 years ago

Add option when predicting a GBM3 model to output a sparse matrix of decision tree rules. Essentially output nTrees x (nInternal + nTerminal) nodes matrix of 1s and 0s where 1s indicate the current record passed through that node.

This would allow users to apply LASSO regression to the sparse node matrix and create simple, weighted rules ensembles as described here:

http://statweb.stanford.edu/~jhf/R_RuleFit.html

Can attempt this myself, but wondering if gbm_pred is the function to use?