plotD3 | R Documentation |
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
.
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")
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:
|
plotD3_acf, plotD3_autocorrelation, plotD3_cooksdistance,
plotD3_halfnormal, plotD3_residual, plotD3_lift,
plotD3_prediction, plotD3_rec, plotD3_roc,
plotD3_rroc, plotD3_scalelocation
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.