Lines Matching full:counts
42 # sizes for each cohort. Other counts indicated how many times
46 # ests: a matrix of size m by k with estimated counts for the probability
68 v <- cohort_row[-1] # counts for individual bits
70 # true counts. It can be negative or
95 # Transform counts from absolute values to fractional, removing bias due to
101 # this possibility, and set the corresponding counts to 0.
112 # Y: a vector of size km with estimated counts from EstimateBloomCounts().
286 .DecodeBoolean <- function(counts, params, num_reports) { argument
287 # Boolean variables are reported without cohorts and to estimate counts,
288 # first sum up counts across all cohorts and then run EstimateBloomCounts
291 summed_counts <- colSums(counts) # sum counts across cohorts
292 es <- EstimateBloomCounts(params, summed_counts) # estimate boolean counts
315 CheckDecodeInputs <- function(counts, map, params) { argument
324 if ((ncol(counts) - 1) != params$k) {
326 "Dimensions of counts file do not match: m = %d, k = %d, ",
327 "nrow(counts) = %d, ncol(counts) = %d"), params$m, params$k,
328 nrow(counts), ncol(counts)))
340 Decode <- function(counts, map, params, alpha = 0.05, argument
343 error_msg <- CheckDecodeInputs(counts, map, params)
357 N <- sum(counts[, 1])
359 return(.DecodeBoolean(counts, params, N))
362 filter_cohorts <- which(counts[, 1] != 0) # exclude cohorts with zero reports
369 es <- EstimateBloomCounts(params, counts)
413 # If this is a basic RAPPOR instance, just use the counts for the estimate
416 fit$Estimate <- colSums(counts)[-1]
472 counts = counts[, -1], resid = NULL, metrics = metrics, nameattr
478 # Counts the number of times each bit in the Bloom filters was set for
508 # Count the times each bit was set, and add cohort counts to first column
509 counts <- lapply(1:params$m, function(i) functionVar
511 counts[which(cohort_freqs == 0)] <- data.frame(rep(0, params$k))
512 cbind(cohort_freqs, do.call("rbind", counts))