
Last chance! 50% off unlimited learning
Sale ends in
This function automatically builds calibration plots and calibration boxplots for model evaluation using regression, quantile regression, and binary and multinomial classification
EvalPlot(data, PredictionColName = c("PredictedValues"),
TargetColName = c("ActualValues"), GraphType = c("calibration"),
PercentileBucket = 0.05, aggrfun = function(x) mean(x, na.rm = TRUE))
Data containing predicted values and actual values for comparison
String representation of column name with predicted values from model
String representation of column name with target values from model
Calibration or boxplot - calibration aggregated data based on summary statistic; boxplot shows variation
Number of buckets to partition the space on (0,1) for evaluation
The statistics function used in aggregation, listed as a function
Calibration plot or boxplot
Other Model Evaluation and Interpretation: ParDepCalPlots
,
RedYellowGreen
, threshOptim
# NOT RUN {
Correl <- 0.85
data <- data.table::data.table(Target = runif(100))
data[, x1 := qnorm(Target)]
data[, x2 := runif(100)]
data[, Independent_Variable1 := log(pnorm(Correl * x1 +
sqrt(1-Correl^2) * qnorm(x2)))]
data[, Predict := (pnorm(Correl * x1 +
sqrt(1-Correl^2) * qnorm(x2)))]
EvalPlot(data,
PredictionColName = "Predict",
TargetColName = "Target",
GraphType = "calibration",
PercentileBucket = 0.05,
aggrfun = function(x) quantile(x, probs = 0.50, na.rm = TRUE))
# }
Run the code above in your browser using DataLab