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:
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?