pmut.edap.disc: Create Exploratory Visualization for Discrete Feature

Description Usage Arguments Value Examples

View source: R/pmut.edap.disc.R

Description

This function creates visualization with a line plot of a specified discrete feature against the response, plus a distribution histogram for that feature. In the line plot, the discrete feature will be the x-axis and the response be the y-axis, which will serve as Actual. NA will be formed as its own level. More lines of Prediction can be created by specifying a prediction data.frame.

Usage

1
pmut.edap.disc(datatable, varstring, targetstring, pred.df = NULL)

Arguments

datatable

Object of class data.frame or data.table

varstring

Single character string indicating the column name inside datatable for the discrete feature

targetstring

Single character string indicating the column name inside datatable for the response

pred.df

Object of class data.frame (optional), with column being prediction from each model

Value

A view of line plot stacked above the histogram

Examples

1
2
3
df = data.frame(ggplot2::diamonds)
pmut.edap.disc(df, "color", "price")
pmut.edap.disc(df, "color", "price", pred.df=data.frame(GLM=as.numeric(df$color)*400+2600))

chengjunhou/pmut documentation built on May 23, 2019, 4:24 p.m.