| discriminator_auc | R Documentation |
Cross-validated area under the ROC curve of a logistic-regression classifier trained to tell real from synthetic records. Out-of-fold predictions are used, and all preprocessing (imputation, scaling, choice of categories) is learned within the training folds, so the AUC is not optimistically biased. Values near 0.5 mean the classifier cannot distinguish the data sets; values near 1 mean the synthetic data are easy to spot.
discriminator_auc(
real,
synthetic,
vars = NULL,
folds = 5L,
max_rows = 10000L,
seed = NULL,
model = c("quadratic", "linear")
)
real, synthetic |
Data frames with common columns. |
vars |
Optional subset of variables. |
folds |
Number of cross-validation folds. |
max_rows |
Each data set is subsampled to at most this many rows. |
seed |
Optional random seed (subsampling). |
model |
Classifier features: |
Values clearly below 0.5 are a warning sign of a different kind: they
arise when synthetic records are copies of real ones. A held-out record
then has an identical twin with the opposite label in the training folds,
and the classifier systematically predicts the wrong class. Check such
cases with dcr(). The AUC is therefore deliberately not folded into a
symmetric measure such as \max(AUC, 1 - AUC): that would report
copies of the real data as easily distinguishable.
The default model = "quadratic" adds squares and pairwise products of
the numeric variables (ridge-penalised), so that differences in spread and
in correlation are detected, not only differences in location.
model = "linear" uses main effects only.
The cross-validated AUC (a number).
syn <- synthesize(iris, seed = 1)
discriminator_auc(iris, syn, seed = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.