View source: R/compute_mu_lambda.R

compute_mu_lambda | R Documentation |

`compute_mu_lambda`

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

compute_mu_lambda(train.data, obs.vec, candidate.thres)

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

`obs.vec` |
list of cities ids used as observers |

`candidate.thres` |
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: https://arxiv.org/abs/2011.00138.

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.