Description Usage Arguments References Examples

See Friedman & Popescu (2008) for a description of the general RuleFit algorithm. This method uses XGBoost to fit a tree ensemble, extracts a ruleset as the conjunction of tree traversals, and fits a sparse linear model to the resulting feature set (including the original feature set) using glmnet.

1 2 3 4 5 6 7 8 9 10 11 12 |

`object` |
a formula prescribing features to use in the model. transformation of the response variable is not supported. when using transformations on the input features (not suggested in general) it is suggested to set sparse=F |

`data` |
a data frame with columns corresponding to the formula |

`family` |
the family of the fitted model. one of 'gaussian', 'binomial', 'multinomial' |

`xgb_control` |
a list of parameters for xgboost. must supply an nrounds argument |

`glm_control` |
a list of parameters for the glmnet fit. must supply a type.measure and nfolds arguments (for the lambda cv) |

`sparse` |
whether a sparse design matrix should be used |

`prefit_xgb` |
an xgboost model (of class xgb.Booster) to be used instead of the model that |

`deoverlap` |
if true, the tree derived rules are deoverlapped, in that the deoverlapped rule set contains no overlapped rules |

`...` |
ignored arguments |

Friedman, J. H., & Popescu, B. E. (2008). Predictive learning via rule
ensembles. *The Annals of Applied Statistics, 2*(3), 916-954.

1 2 3 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.