ck_cnt_measures {cellKey}R Documentation

Utility measures for perturbed counts

Description

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

Usage

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

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

[Package cellKey version 1.0.2 Index]