compute_mu_lambda: Compute Mu and Lambda for Source Detection Function

View source: R/compute_mu_lambda.R

compute_mu_lambdaR Documentation

Compute Mu and Lambda for Source Detection Function


compute_mu_lambda computes 'mu' and 'lambda' from training data and selected observers, for Gaussian source estimation with prior information


compute_mu_lambda(, obs.vec, candidate.thres)


training data for 'mu' and 'lambda' list computation format-list, length-number of cities/nodes format of[[i]]- number of simulated scenarios x number of cities/nodes, each entry is minimum arrival time


list of cities ids used as observers


threshold to determine if a node/city could be a candidate for source e.g. if we set this number to be 0.2, if in [x] simulated scenarios, there are only 10 percent scenarios a node [a] is infected, we do not think [a] is a potential source


a list, consisting of 3 variables: mu.mat, lambda.list, poss.candidate.vec mu.mat: matrix- number of cities/nodes x number of observers, each row represents- if this node is the source, the mean of arrival time vector; lambda.list: a length-number of cities/nodes list, each element is a number of observers x number of observers matrix- if a node is the source, the covariance matrix for arrival time vector; poss.candidate.vec: a boolean vector indicating if a node has the potential to be the source


Jun Li


Li, J., Manitz, J., Bertuzzo, E. and Kolaczyk, E.D. (2020). Sensor-based localization of epidemic sources on human mobility networks. arXiv preprint Available online:


# fake training data, indicating format
nnodes <- 851 <- 1312
nsimu <- 20 <- list()
for (j in 1:nnodes) {[[j]] <- matrix(, 
    size = nsimu*nnodes, replace = TRUE), nrow = nsimu, ncol = nnodes)
obs.vec <- (1:9)
candidate.thres <- 0.3
mu.lambda.list <- compute_mu_lambda(, obs.vec, candidate.thres)

NetOrigin documentation built on March 18, 2022, 7:49 p.m.