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

Description Usage Arguments Value Examples

View source: R/CDFtestingSuite.R

Description

Generates mean/median empirical error measurements, complete results, single iterations of DP CDFs at each combination of parameters, and diagnostic functions used.

Usage

1
2
3
CDFtestTrack(funct, eps, cdfstep = 1, data, range, gran, reps,
  SmoothAll = FALSE, ABounds = FALSE, EmpiricBounds = 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

cdfstep

The step sized used in outputting the approximate CDF; the values output are [min, min + cdfstep], [min, min + 2 * cdfstep], etc. Setting cdfstep equal to 0 (default) will set cdfstep = granularity

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). The Domain (ie gran and range) should be identical to those used to create the CDF!

reps

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

SmoothAll

Applies L2 monotnocity post-processing to every DP-CDF

ABounds

This is a flag and should be set to "true" if the functions being tested are expected to output analytical variance bounds. The proper output form is output = list(DPCDFvector, LowerBoundVector, UpperBoundVector)

EmpiricBounds

When TRUE, outputted graphs depict the minimum and maximum values taken by each bin across reps

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 list in the form of:

...$meanscores Contains mean diagnostic results for each diagnostic across reps iterations;

...$medianscores Contains median diagnostic results for each diagnostic across reps iterations;

...$yourCDFoutput Containing a single dpCDF iteration;

...$yourPDFoutput Containing a single dpPDF iteration;

...$realCDFoutput Containing the real (non-DP) CDF output;

...$realPDFoutput Containing the real (non-DP) PDF output;

...$databins Containing the domain used to construct the CDFs;

...$TestPack_CDF Containing the definitions of diagnostic functions used on dpCDFs;

...$TestPack_PDF Containing the definitions of diagnostic functions used on dpPDFs;

...$allscores Containing all raw diagnostic output.

Examples

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

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