Skip to contents

Unlike Uniformity, it does not make sense to calculate the bitaliasing of a single bit vector. Thus, bitaliasing only works on 2D matrix.

Usage

bitaliasing(crps)

Arguments

crps

A bit vector or a 2D CRP matrix

Value

The normalized Hamming weight of each column.

Details

Like Unformity, this function assumes that the CRPs are supplied in a 2D matrix, where each row corresponds to a device and each column corresponds to a CRP.

Bitaliasing measures the distribution of 1s and 0s for a single CRPs across all devices.

$$Bitaliasing(c) = \frac{1}{\#D} \sum_{d \in D} r_c$$

See also

Examples

## Bitaliasing of a matrix
bitaliasing(rbits(c(5, 50)))
#>  [1] 0.4 0.4 0.4 1.0 0.4 0.8 0.8 0.4 0.6 0.8 0.2 0.6 0.6 0.4 0.2 0.4 0.6 0.2 0.6
#> [20] 0.4 0.8 0.6 0.6 0.8 0.4 0.8 0.8 0.2 0.0 0.0 0.4 0.2 0.0 0.4 0.2 0.4 0.6 0.8
#> [39] 0.4 0.8 0.4 0.6 0.4 0.6 0.8 0.8 0.4 0.8 0.8 0.8