ck_cnt_measures: Utility measures for perturbed counts

Description Usage Arguments Value Examples

View source: R/ck_cnt_measures.R

Description

This function computes utility/information loss measures based on two numeric vectors (original and perturbed)

Usage

1
ck_cnt_measures(orig, pert, exclude_zeros = TRUE)

Arguments

orig

a numeric vector holding original values

pert

a numeric vector holding perturbed values

exclude_zeros

a scalar logical value; if TRUE (the default), all only cells with counts > 0 are used when computing distances d1, d2 and d3. If this argument is FALSE, the complete vector is used.

Value

a list containing the following elements:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
orig <- c(1:10, 0, 0)
pert <- orig; pert[c(1, 5, 7)] <- c(0, 6, 9)

# ignore empty cells when computing measures `d1`, `d2`, `d3`
ck_cnt_measures(orig = orig, pert = pert, exclude_zeros = TRUE)

# use all cells
ck_cnt_measures(orig = orig, pert = pert, exclude_zeros = FALSE)

# for an application on a perturbed object, see ?cellkey_pkg

sdcTools/cellKey documentation built on July 22, 2019, 1:17 a.m.