This function assumes that if the CRPs are supplied in a 2D matrix, each row corresponds to a device and each column corresponds to a CRP.
Value
If crps
is a vector, the normalized Hamming weight. If crps
is a matrix, the normalized Hamming weight of each row.
Details
Uniformity measures the distribution of 1s and 0s across all CRPs for each device. To calculate uniformity, margin
should be 1.
$$Uniformity(d) = \frac{1}{\#C} \sum_{r \in R_d} r$$