Plots the Accumulated Local Effects (ALE) from an ERF object

plot_ALE(
  ALE,
  xquantiles = c(0.025, 0.975),
  yquantiles = c(0.1, 0.5, 0.9),
  name,
  cex.axis = 1,
  cex.lab = 1,
  rug = TRUE,
  rug.col = "gray50",
  rug.tick = 0.02,
  rug.lwd = 0.5,
  rug.alpha = 0.2,
  rug.max = 1000,
  gap.axis = NA,
  alt.labels = NULL
)

Arguments

ALE

an ALE object for a given variable; indexed as a list for full functionality

xquantiles

lower and upper quantile bounds to limit x values to

yquantiles

lower, middle, and upper quantiles to plot the confidence interval around the ALE predictions

name

the x-axis label of the variable; self-supplied if indexed as a list

cex.axis

the cex of the axis

cex.lab

the cex of the labels

rug

logical for turning the rug plot on/off (defaults to table values for class=='factor')

rug.col

color of rug ticks

rug.tick

length of rug ticks

rug.lwd

width of rug ticks

rug.alpha

transparency of rug ticks

rug.max

maximum number of ticks to plot (useful for big data)

Value

A plot of the ALEs

Examples

#run an ERF with 10 RFs and 
ens_rf_ex <- ens_random_forests(df=simData$samples, var="obs", covariates=grep("cov", colnames(simData$samples),value=T), save=FALSE, cores=1)
#> rounding n.forests to the nearest one

ALE_df <- ALE_fn(ens_rf_ex, save=FALSE)
#> Error in ALE_fn(ens_rf_ex, save = FALSE): unused argument (save = FALSE)

plot_ALE(ALE_df[1])
#> Error in eval(expr, envir, enclos): object 'ALE_df' not found