CDFtestTrackx: Test a single CDF implementation with one set of parameters.

Description Usage Arguments Value Examples

View source: R/CDFtestingSuite.R

Description

Applies diagnostic functions to a single dpCDF, and only releases a complete set of diagnostic results (called withinCDFtest in Data Collection mode — e.g., when Visualization = FALSE)

Usage

1
2
3
CDFtestTrackx(funct, eps, data, range = range, gran, reps, samplesize,
  SmoothAll = FALSE, ExtraTests_CDF = list(), ExtraTests_PDF = list(),
  ...)

Arguments

funct

The differentially-private CDF-generating function to be tested

eps

Epsilon value for Differential privacy control

data

A vector of the data (single variable to compute CDFs from)

range

A vector length 2 containing user-specified min and max to truncate the universe to

gran

The smallest unit of measurement in the data (one [year] for a list of ages)

reps

The number of times the combination of CDFfunction, dataset, and epsilon will be tested

samplesize

The specified sample size is randomly selected from each dataset without replacement.

SmoothAll

Applies L2 monotonicity post-processing to every DP-CDF

ExtraTests_CDF

If a user wishes to add extra diagnostics, the proper syntax would be: ExtraTests_CDF = list( functionName1 = function1, functionName2 = function2)

ExtraTests_PDF

See above

...

Optionally add additional parameters. This is primarily used to allow automated execution of varied diagnostic functions.

Value

A complete set of diagnostic results in the form of ...$allscores, which holds out a row of output for each of reps results.

Examples

1
2
CDFtestTrackx(badCDF, eps = .01, cdfstep = 0, data = rexp(10000,.4),
  range= c(1,10), gran = .1, reps = 20, samplesize = 10000)

Example output

$allscores
$allscores$MaxError_CDF
 [1] 0.8858 0.8858 0.8858 0.8858 0.8858 0.8858 0.8858 0.8858 0.8858 0.8858
[11] 0.8858 0.8858 0.8858 0.8858 0.8858 0.8858 0.8858 0.8858 0.8858 0.8858

$allscores$MaxErrorAt_CDF
 [1] 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10

$allscores$diffat25
 [1] 0.3322 0.3322 0.3322 0.3322 0.3322 0.3322 0.3322 0.3322 0.3322 0.3322
[11] 0.3322 0.3322 0.3322 0.3322 0.3322 0.3322 0.3322 0.3322 0.3322 0.3322

$allscores$diffatMedian
 [1] 0.5102 0.5102 0.5102 0.5102 0.5102 0.5102 0.5102 0.5102 0.5102 0.5102
[11] 0.5102 0.5102 0.5102 0.5102 0.5102 0.5102 0.5102 0.5102 0.5102 0.5102

$allscores$diffat75
 [1] 0.7505 0.7505 0.7505 0.7505 0.7505 0.7505 0.7505 0.7505 0.7505 0.7505
[11] 0.7505 0.7505 0.7505 0.7505 0.7505 0.7505 0.7505 0.7505 0.7505 0.7505

$allscores$horzdiffat25
 [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

$allscores$horzdiffatMed
 [1] 1.8 1.8 1.8 1.8 1.8 1.8 1.8 1.8 1.8 1.8 1.8 1.8 1.8 1.8 1.8 1.8 1.8 1.8 1.8
[20] 1.8

$allscores$horzdiffat75
 [1] 3.4 3.4 3.4 3.4 3.4 3.4 3.4 3.4 3.4 3.4 3.4 3.4 3.4 3.4 3.4 3.4 3.4 3.4 3.4
[20] 3.4

$allscores$Medians
 [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

$allscores$MAE_CDF
 [1] 0.7216264 0.7216264 0.7216264 0.7216264 0.7216264 0.7216264 0.7216264
 [8] 0.7216264 0.7216264 0.7216264 0.7216264 0.7216264 0.7216264 0.7216264
[15] 0.7216264 0.7216264 0.7216264 0.7216264 0.7216264 0.7216264

$allscores$MSE
 [1] 0.5515305 0.5515305 0.5515305 0.5515305 0.5515305 0.5515305 0.5515305
 [8] 0.5515305 0.5515305 0.5515305 0.5515305 0.5515305 0.5515305 0.5515305
[15] 0.5515305 0.5515305 0.5515305 0.5515305 0.5515305 0.5515305

$allscores$MaxError_PDF
 [1] 0.2322 0.2322 0.2322 0.2322 0.2322 0.2322 0.2322 0.2322 0.2322 0.2322
[11] 0.2322 0.2322 0.2322 0.2322 0.2322 0.2322 0.2322 0.2322 0.2322 0.2322

$allscores$MaxErrorAt_PDF
 [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

$allscores$MAE_PDF
 [1] 0.009734066 0.009734066 0.009734066 0.009734066 0.009734066 0.009734066
 [7] 0.009734066 0.009734066 0.009734066 0.009734066 0.009734066 0.009734066
[13] 0.009734066 0.009734066 0.009734066 0.009734066 0.009734066 0.009734066
[19] 0.009734066 0.009734066

$allscores$MSE_PDF
 [1] 0.0006937793 0.0006937793 0.0006937793 0.0006937793 0.0006937793
 [6] 0.0006937793 0.0006937793 0.0006937793 0.0006937793 0.0006937793
[11] 0.0006937793 0.0006937793 0.0006937793 0.0006937793 0.0006937793
[16] 0.0006937793 0.0006937793 0.0006937793 0.0006937793 0.0006937793

$allscores$MeanDiff
 [1] 2.37978 2.37978 2.37978 2.37978 2.37978 2.37978 2.37978 2.37978 2.37978
[10] 2.37978 2.37978 2.37978 2.37978 2.37978 2.37978 2.37978 2.37978 2.37978
[19] 2.37978 2.37978

$allscores$ModeDiff
 [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

$allscores$StdDiff
 [1] 1.63915 1.63915 1.63915 1.63915 1.63915 1.63915 1.63915 1.63915 1.63915
[10] 1.63915 1.63915 1.63915 1.63915 1.63915 1.63915 1.63915 1.63915 1.63915
[19] 1.63915 1.63915

$allscores$VarDiff
 [1] 3.619833 3.619833 3.619833 3.619833 3.619833 3.619833 3.619833 3.619833
 [9] 3.619833 3.619833 3.619833 3.619833 3.619833 3.619833 3.619833 3.619833
[17] 3.619833 3.619833 3.619833 3.619833

$allscores$SkewDiff
 [1] -2.030268 -2.030268 -2.030268 -2.030268 -2.030268 -2.030268 -2.030268
 [8] -2.030268 -2.030268 -2.030268 -2.030268 -2.030268 -2.030268 -2.030268
[15] -2.030268 -2.030268 -2.030268 -2.030268 -2.030268 -2.030268

$allscores$KurtDiff
 [1] -0.1326975 -0.1326975 -0.1326975 -0.1326975 -0.1326975 -0.1326975
 [7] -0.1326975 -0.1326975 -0.1326975 -0.1326975 -0.1326975 -0.1326975
[13] -0.1326975 -0.1326975 -0.1326975 -0.1326975 -0.1326975 -0.1326975
[19] -0.1326975 -0.1326975

$allscores$MSEanalytic
 [1] 0.11 0.11 0.11 0.11 0.11 0.11 0.11 0.11 0.11 0.11 0.11 0.11 0.11 0.11 0.11
[16] 0.11 0.11 0.11 0.11 0.11

CDF.PSIdekick documentation built on May 30, 2017, 5:09 a.m.