Skip to contents

  • Extract — pull a data frame out of a fit
  • Start here. Each extractor takes a fitted model and returns a tidy data frame with a documented column contract, so what a figure shows can be read, tested and reshaped before anything is drawn. gg_boost_error() needs a fit grown with cv.flag = TRUE; boostmtree records the error path and the optimal iteration only when cross-validation ran.

    gg_boost_error()
    Boosting error trajectory data object
    gg_boost_path()
    Boosting parameter path data object
    gg_boost_trajectory()
    Subject trajectory data object
    gg_boost_vimp()
    Variable importance data object
    gg_boost_effect()
    Partial and marginal effect data object
    boostmlr_partial()
    Partial effects from a BoostMLR fit
    gg_boost_calibration()
    Calibration over follow-up data object

  • Render — draw the extracted object
  • The autoplot() method for each extracted class, with plot() as its alias. Rendering reads only the column contract above, which is what lets a new modelling backend be added by writing extractor methods and nothing else.

  • Shortcut — straight from a fit
  • Skips the two steps for the one figure worth looking at first. Every other figure is reached through its own extractor.

    autoplot(<boostmtree>)
    Plot a boostmtree fit

    Package overview

    The two-step shape – extract, then render – and why the seam is where it is.

    ggBoostedTrees ggBoostedTrees-package
    ggBoostedTrees: Visually Exploring Boosted Tree Models