plotD3 {auditor} | R Documentation |
Model Diagnostic Plots in D3 with r2d3 package.
Description
This function provides several diagnostic plots for regression and classification models.
Provide object created with one of auditor's computational functions, model_residual
,
model_cooksdistance
, model_evaluation
, model_performance
,
model_evaluation
.
Usage
plotD3(x, ...)
plotD3_auditor(x, ..., type = "residual")
## S3 method for class 'auditor_model_residual'
plotD3(x, ..., type = "residual")
## S3 method for class 'auditor_model_halfnormal'
plotD3(x, ..., type = "residual")
## S3 method for class 'auditor_model_evaluation'
plotD3(x, ..., type = "residual")
## S3 method for class 'auditor_model_cooksdistance'
plotD3(x, ..., type = "residual")
Arguments
x |
object of class |
... |
other arguments dependent on the type of plot or additional objects of classes |
type |
the type of plot. Single character. Possible values:
|
See Also
plotD3_acf, plotD3_autocorrelation, plotD3_cooksdistance,
plotD3_halfnormal, plotD3_residual, plotD3_lift,
plotD3_prediction, plotD3_rec, plotD3_roc,
plotD3_rroc, plotD3_scalelocation
Examples
dragons <- DALEX::dragons[1:100, ]
# fit a model
model_lm <- lm(life_length ~ ., data = dragons)
lm_audit <- audit(model_lm, data = dragons, y = dragons$life_length)
# validate a model with auditor
mr_lm <- model_residual(lm_audit)
# plot results
plotD3(mr_lm)
plotD3(mr_lm, type = "prediction")
hn_lm <- model_halfnormal(lm_audit)
plotD3(hn_lm)