determineMechanism: Determine Mechanism

Description Usage Arguments Value

View source: R/utilities-histogram.R

Description

This is a set of helper functions to determine which mechanism to use when calculating the histogram (either the stability mechanism or the Laplace mechanism).

Usage

1
determineMechanism(varType, rng, bins, nBins, granularity)

Arguments

varType

Character, the variable type.

rng

Numeric, a priori estimate of the lower and upper bounds of a variable taking numeric values. Ignored for categorical types. Maybe be null for numeric or integer types, in which case the stability mechanism is used.

bins

Character or numeric, the available bins or levels of a variable. Character for categorical variables, a vector of numbers for numeric variables.

nBins

Integer, the number of bins to release.

granularity

Numeric, the width of each histogram bin.

Value

a string indicating the mechanism to use when constructing the differentially private histogram


privacytoolsproject/PSI-Library documentation built on Feb. 17, 2020, 2:03 p.m.