Skip to contents

sensitivity_score calculates the fraction of cells (with a value) that are considered sensitive according to the used disclosure_risk

Usage

sensitivity_score(x, max_risk = x$max_risk, min_count = x$min_count, ...)

Arguments

x

sdc_raster object.

max_risk

a risk value higher than max_risk will be sensitive.

min_count

a count lower than min_count will be sensitive.

...

passed on to is_sensitive

Examples

# \donttest{
consumption <- sdc_raster(dwellings[1:2], variable = dwellings$consumption, r = 500)

sensitivity_score(consumption)
#> [1] 0.4207188
# same as
print(consumption)
#> numeric sdc_raster object: 
#>    resolution: 500 500 ,  max_risk: 0.95 , min_count: 10 
#>    mean sensitivity score [0,1]:  0.4207188

# change the rules! A higher norm generates more sensitive cells
sensitivity_score(consumption, min_count = 20)
#> [1] 0.5116279
# }