View source: R/ModelEvaluationPlots.R
ParDepCalPlots | R Documentation |
This function automatically builds partial dependence calibration plots and partial dependence calibration boxplots for model evaluation using regression, quantile regression, and binary and multinomial classification
ParDepCalPlots(
data,
PredictionColName = NULL,
TargetColName = NULL,
IndepVar = NULL,
GraphType = "calibration",
PercentileBucket = 0.05,
FactLevels = 10,
Function = function(x) mean(x, na.rm = TRUE),
DateColumn = NULL,
DateAgg_3D = NULL,
PlotYMeanColor = "black",
PlotXMeanColor = "chocolate",
PlotXLowColor = "purple",
PlotXHighColor = "purple"
)
data |
Data containing predicted values and actual values for comparison |
PredictionColName |
Predicted values column names |
TargetColName |
Target value column names |
IndepVar |
Independent variable column names |
GraphType |
calibration or boxplot - calibration aggregated data based on summary statistic; boxplot shows variation |
PercentileBucket |
Number of buckets to partition the space on (0,1) for evaluation |
FactLevels |
The number of levels to show on the chart (1. Levels are chosen based on frequency; 2. all other levels grouped and labeled as "Other") |
Function |
Supply the function you wish to use for aggregation. |
DateColumn |
Add date column for 3D scatterplot |
DateAgg_3D |
Aggregate date column by 'day', 'week', 'month', 'quarter', 'year' |
Partial dependence calibration plot or boxplot
Adrian Antico
Other Model Evaluation and Interpretation:
AutoShapeShap()
,
CumGainsChart()
,
EvalPlot()
,
ROCPlot()
,
RedYellowGreen()
,
ResidualPlots()
,
SingleRowShapeShap()
,
threshOptim()
## Not run:
# Create fake data
data <- AutoQuant::FakeDataGenerator(
Correlation = 0.70, N = 10000000, Classification = FALSE)
data.table::setnames(data, "Independent_Variable2", "Predict")
# Build plot
Plot <- AutoQuant::ParDepCalPlots(
data,
PredictionColName = "Predict",
TargetColName = "Adrian",
IndepVar = "Independent_Variable1",
GraphType = "calibration",
PercentileBucket = 0.20,
FactLevels = 10,
Function = function(x) mean(x, na.rm = TRUE),
DateColumn = NULL,
DateAgg_3D = NULL)
# Step through function
# PredictionColName = "Predict"
# TargetColName = "Adrian"
# IndepVar = "Independent_Variable1"
# GraphType = "calibration"
# PercentileBucket = 0.20
# FactLevels = 10
# Function = function(x) mean(x, na.rm = TRUE)
# DateColumn = NULL
# DateAgg_3D = NULL
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.