pmut.edap.cont: Create Exploratory Visualization for Continuous Feature

Description Usage Arguments Value Examples

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

Description

This function creates visualization with a line plot of a specified continuous feature against the response, plus a distribution histogram for that feature. In the line plot, the continuous feature will be cut into bins and then placed on the x-axis. The response will be the y-axis, which will serve as Actual. Binning characteristics will be controlled by meta and qbin. NA will be formed as its own bin. More lines of Prediction can be created by specifying a prediction data.frame.

Usage

1
2
pmut.edap.cont(datatable, varstring, targetstring, meta = c(50, 4, 0.01,
  0.99), qbin = FALSE, 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

meta

Numeric vector with length of 4 (default is c(50,4,0.01,0.99)): 1st indicates number of bins, 2nd indicates bin rounding digits, 3rd and 4th indicate the outlier percentile

qbin

Logical (default is FALSE), FALSE indicates equal length bins, TRUE indicates equal weight bins (quantile view)

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
4
df = data.frame(ggplot2::diamonds)
pmut.edap.cont(df, "carat", "price")
pmut.edap.cont(df, "carat", "price", meta=c(12,2,0,1), qbin=TRUE)
pmut.edap.cont(df, "carat", "price", pred.df=data.frame(GLM=df$carat*7000-1000))

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