groupHist: ctree classificaiton results plot for a binary response...

Description Usage Arguments

View source: R/util-tree.R

Description

plot a histogram of customer segments and enrollment percentages, based on the membership of ctree leaf nodes. The plot is a "histogram" whose x-axis is the average "True" response for each ctree leaf node and whose height is the number of customers in each corresponding group. Strong results have nodes with high membership far from the sample mean.

Usage

1
2
3
groupHist(df, df.ct, responseCol, title = "Group probabilities",
  idCol = "id", xlab = "Enrollment probability (%)", normalize = FALSE,
  compareData = NULL, colors = NULL)

Arguments

df

data.frame with response variable to be explained and all explanatory variables to be used in ctree classificaiton

df.ct

ctree already trained on data, that is used to classify the data points in each sub sample.

responseCol

the name of the variable that the ctree is trying to explain

title

figure title of the plot

idCol

column with data row identifiers in it, which is removed from the df

xlab

label for x-axis of the figure

normalize

boolean for whether the x-axis should be percentages compared to the sample mean or absolute percentages

compareData

optional data.fram of one additional set of bar values to be plotted as well.

colors

optional named list specifying the figure colors.


ConvergenceDA/visdom documentation built on May 6, 2019, 12:51 p.m.