Skip to contents

Compute the quality metrics of the given CRP matrix

Usage

metrics(crps, with_entropy = FALSE)

Arguments

crps

A 2D or 3D CRP matrix

with_entropy

If TRUE, wrap the results of the metrics with the Shannon entropy. By default FALSE.

Value

The calculated metrics in a pufmetrics object.

Examples

crps <- rbits(c(5, 50))
metrics(crps)
#> $reliability
#> [1] NA
#> 
#> $devices
#> [1] 1 2 3 4 5
#> 
#> $challenges
#>  [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
#> [26] 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
#> 
#> $uniformity
#> [1] 0.56 0.42 0.44 0.42 0.44
#> 
#> $bitaliasing
#>  [1] 0.2 0.4 0.8 0.2 0.2 0.6 0.2 0.6 0.6 0.8 0.4 0.4 0.4 0.4 0.6 0.4 0.2 0.6 0.6
#> [20] 0.8 0.4 0.4 0.6 0.4 0.4 0.4 0.6 0.6 0.2 0.4 0.6 0.8 0.6 0.4 0.4 0.2 0.2 0.4
#> [39] 0.8 0.2 0.2 0.8 0.2 0.6 0.4 0.4 0.6 0.6 0.0 0.6
#> 
#> $uniqueness
#>  [1] 0.54 0.48 0.42 0.44 0.54 0.52 0.54 0.46 0.44 0.42
#> 
#> attr(,"class")
#> [1] "pufmetrics"

crps <- rbits(c(5, 50, 3))
metrics(crps)
#> $reliability
#>      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14]
#> [1,]  1.0  1.0  0.0  1.0  0.0  1.0    1  0.0  0.5   1.0   0.0   0.0   1.0   0.5
#> [2,]  1.0  0.0  0.5  0.5  1.0  0.5    0  0.0  1.0   0.5   0.0   1.0   1.0   0.0
#> [3,]  0.5  0.5  0.5  1.0  0.0  0.0    1  0.5  0.0   0.5   0.5   0.5   0.0   1.0
#> [4,]  0.5  1.0  0.5  1.0  0.5  0.5    1  0.5  0.5   0.0   0.0   0.0   0.5   1.0
#> [5,]  0.5  0.0  0.5  0.5  0.5  1.0    0  0.0  0.0   1.0   0.5   0.5   0.5   0.5
#>      [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [,26]
#> [1,]   1.0   0.5   1.0   0.5   0.5   0.0   0.5   0.5   0.5   0.5   0.0   0.0
#> [2,]   0.5   0.5   0.5   1.0   0.5   0.5   0.5   0.5   0.5   0.5   0.5   0.0
#> [3,]   0.5   1.0   0.5   0.5   0.5   0.5   0.5   1.0   0.5   0.5   0.0   0.5
#> [4,]   0.0   0.5   0.5   1.0   0.5   0.5   0.5   0.5   0.5   1.0   0.5   0.0
#> [5,]   1.0   0.5   0.5   0.5   0.5   0.5   0.5   0.5   1.0   0.5   0.5   0.5
#>      [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36] [,37] [,38]
#> [1,]   0.5   1.0     0   0.0   1.0   0.5   0.5   0.5   0.5   0.0   0.5   0.0
#> [2,]   0.0   0.5     1   0.5   0.5   0.5   0.0   0.5   0.5   1.0   0.0   0.5
#> [3,]   1.0   0.0     0   1.0   0.5   0.0   0.5   1.0   1.0   0.0   1.0   0.0
#> [4,]   1.0   0.0     1   0.5   0.5   0.0   1.0   0.5   0.0   0.0   1.0   0.5
#> [5,]   1.0   1.0     1   0.0   1.0   0.0   0.5   0.0   0.0   0.5   0.5   0.5
#>      [,39] [,40] [,41] [,42] [,43] [,44] [,45] [,46] [,47] [,48] [,49] [,50]
#> [1,]   0.0   0.0   0.5   1.0   0.0   0.0   0.0   1.0   0.0   0.5   1.0   0.5
#> [2,]   0.5   0.0   1.0   0.5   0.0   0.5   1.0   0.5   1.0   0.5   0.5   0.0
#> [3,]   1.0   0.0   0.5   0.0   0.0   0.5   0.5   0.5   0.5   1.0   0.5   0.0
#> [4,]   1.0   0.5   0.5   0.5   0.5   1.0   0.5   0.5   0.0   0.5   0.5   0.5
#> [5,]   0.0   0.5   0.0   0.5   0.5   0.0   0.5   0.5   0.5   0.0   1.0   0.0
#> 
#> $devices
#> [1] 1 2 3 4 5
#> 
#> $challenges
#>  [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
#> [26] 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
#> 
#> $samples
#> [1] 1 2 3
#> 
#> $uniformity
#> $uniformity[[1]]
#> [1] 0.58 0.52 0.50 0.52 0.48
#> 
#> $uniformity[[2]]
#> [1] 0.52 0.64 0.48 0.58 0.48
#> 
#> $uniformity[[3]]
#> [1] 0.48 0.54 0.56 0.54 0.64
#> 
#> 
#> $bitaliasing
#> $bitaliasing[[1]]
#>  [1] 0.2 0.4 0.8 0.6 0.4 0.8 1.0 0.2 0.8 0.2 0.4 0.6 0.6 0.4 0.8 0.6 0.4 0.2 0.8
#> [20] 0.6 0.4 0.2 0.4 0.0 0.4 0.4 0.2 0.8 0.8 0.4 0.2 1.0 0.6 0.4 0.4 0.6 1.0 0.4
#> [39] 0.4 0.2 0.2 1.0 0.6 0.8 0.6 0.2 0.6 0.8 0.4 0.8
#> 
#> $bitaliasing[[2]]
#>  [1] 0.8 0.4 0.4 0.4 0.2 0.8 0.4 0.2 0.8 0.8 0.2 0.4 0.6 0.2 0.0 0.6 0.6 0.6 0.0
#> [20] 0.4 0.4 0.4 0.8 0.4 0.8 0.6 0.8 0.8 0.6 0.6 0.8 1.0 0.8 0.4 0.6 0.8 0.6 0.4
#> [39] 0.8 0.0 0.2 0.4 0.6 0.6 0.4 0.8 0.8 0.6 0.6 0.8
#> 
#> $bitaliasing[[3]]
#>  [1] 0.2 0.6 0.8 0.4 0.6 0.4 0.4 0.2 0.4 0.4 0.6 0.8 0.2 0.6 0.4 0.2 0.2 0.8 1.0
#> [20] 0.8 0.6 0.4 0.4 0.8 0.6 0.6 1.0 0.6 0.6 0.2 0.6 0.6 0.6 0.2 0.6 1.0 0.2 0.2
#> [39] 1.0 0.4 0.8 0.6 0.6 0.6 1.0 0.4 0.8 0.4 0.4 0.8
#> 
#> 
#> $uniqueness
#> $uniqueness[[1]]
#>  [1] 0.54 0.64 0.50 0.58 0.58 0.48 0.56 0.42 0.58 0.52
#> 
#> $uniqueness[[2]]
#>  [1] 0.48 0.60 0.46 0.56 0.52 0.46 0.44 0.58 0.68 0.50
#> 
#> $uniqueness[[3]]
#>  [1] 0.62 0.52 0.54 0.48 0.54 0.52 0.54 0.50 0.44 0.58
#> 
#> 
#> attr(,"class")
#> [1] "pufmetrics"