Learn R Programming

bartMan

https://doi.org/10.52933/jdssv.v4i1.79

bartMan is an R-package for investigating and visualising Bayesian Additive Regression Tree (BART) model fits. We construct conventional plots to analyze a model’s performance and stability as well as create new tree-based plots to analyze variable importance, interaction, and tree structure. We employ Value Suppressing Uncertainty Palettes (VSUP) to construct heatmaps that display variable importance and interactions jointly using color scale to represent posterior uncertainty. Our visualizations are designed to work with the most popular BART R packages available, namely BART, dbarts, and bartMachine. A practical example of the package in use can be found in our detailed vignette.

Installation

You can install the released version of bartMan from CRAN with:

install.packages("bartMan")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("AlanInglis/bartMan")

You can then load the package with:

library(bartMan)

Copy Link

Version

Install

install.packages('bartMan')

Monthly Downloads

191

Version

0.1.1

License

GPL (>= 2)

Maintainer

Alan Inglis

Last Published

July 24th, 2024

Functions in bartMan (0.1.1)

permVint

permVint
plotProximity

plotProximity
mdsBart

mdsBart
train_bivariate

Train range for bivariate scale
treeBarPlot

Plot Frequency of Tree Structures
vintPlot

vintPlot
vimpPlot

vimpPlot
treeNodes

treeNodes
plotSingleTree

plotSingleTree
tree_data_example

tree_data_example
splitDensity

splitDensity
viviBartMatrix

viviBartMatrix
viviBart

viviBart
terminalFunction

Generate Terminal Node Indicator
treeDepth

treeDepth
print.hideHelper1

print.hideHelper
plotTrees

Plot Trees with Customisations
tree_dataframe

Transform tree data into a structured dataframe
sort_trees_by_depthMax

Sort Trees by Maximum Depth
vimpBart

vimpBart
treeList

Generate a List of Tree Structures from BART Model Output
proximityMatrix

proximityMatrix
viviBartPlot

viviBartPlot
combineDummy

Update Dummy Variable Names
clusterTrees

Cluster Trees by Variable
bartDiag

bartDiag
extractTreeData

extractTreeData
RangeBivariate

Constructor for bivariate range object
bartRegrDiag

bartRegrDiag
permVimp

permVimp
ScaleBivariate

Constructor for bivariate scale object
node_depth

Calculate Node Depths in a Tree Data Frame
bartClassifDiag

bartClassifDiag
localProcedure

localProcedure
acceptRate

acceptRate
getChildren

Generate Child and Parent Node Relationships
guide_colourfan

Colourfan guide
getObservations

Get Observations Falling into Each Node
pal_vsup

Variance suppressing uncertainty palette
get_stump_colour_for_legend

Determines the stump color for a legend based on its mean value
input_data

input_data