| compare_synthetic | R Documentation |
compare_synthetic() evaluates the fidelity, utility and disclosure risk
of a synthetic data set in one call:
marginal: marginal_metrics() per variable;
association: association_matrix() of both data sets and their
difference;
utility: pmse() and cross-validated discriminator_auc();
privacy: dcr() distance to closest record.
The result has print(), summary(), plot() and
ggplot2::autoplot() methods.
compare_synthetic(
real,
synthetic,
vars = NULL,
metrics = c("marginal", "association", "utility", "privacy"),
max_rows = 5000L,
seed = NULL
)
real, synthetic |
Data frames (or objects coercible to data frames) with common columns. |
vars |
Optional subset of variables. |
metrics |
Which groups of metrics to compute. |
max_rows |
Maximum rows per data set for the classifier and distance computations. |
seed |
Optional random seed. |
An object of class sp_comparison.
syn <- synthesize(iris, seed = 1)
cmp <- compare_synthetic(iris, syn, seed = 1)
cmp
plot(cmp, type = "association")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.