calibrate.online.network.missing {changepoints} | R Documentation |
Calibrate step for online change point detection for network data with missing values.
Description
Calibrate step for online change point detection for network data by controlling the false alarm rate at level alpha.
Usage
calibrate.online.network.missing(
train_miss_list,
train_eta_list,
threshold_len,
alpha_grid,
permu_num,
pi_lb_hat,
pi_ub_hat,
rho_hat,
rank_hat,
C_lambda = 2/3,
delta = 5
)
Arguments
train_miss_list |
A |
train_eta_list |
A |
threshold_len |
An |
alpha_grid |
A |
permu_num |
An |
pi_lb_hat |
A |
pi_ub_hat |
A |
rho_hat |
A |
rank_hat |
An |
C_lambda |
A |
delta |
An |
Value
A list
with the following structure:
C_lambda |
The absolute constant |
rho_hat |
the (estimated) sparsity parameter |
rank_hat |
the (estimated) rank of underlying graphon matrix |
pi_lb_hat |
the (estimated) lower bound of the missing probability |
pi_ub_hat |
the (estimated) upper bound of the missing probability |
thresholds_array |
A |
Author(s)
Haotian Xu
References
Dubey, Xu and Yu (2021) <arxiv:2110.06450>
See Also
online.network.missing
for detecting online change point.
Examples
p = 6 # number of nodes
rho = 0.5 # sparsity parameter
block_num = 3 # number of groups for SBM
train_obs_num = 150 # sample size for each segment
conn1_mat = rho * matrix(c(0.6,1,0.6,1,0.6,0.5,0.6,0.5,0.6), nrow = 3) # connectivity matrix
set.seed(1)
can_vec = sample(1:p, replace = FALSE) # randomly assign nodes into groups
sbm = simu.SBM(conn1_mat, can_vec, train_obs_num, symm = TRUE, self = TRUE)
train_mat = sbm$obs_mat
train_list = lapply(1:ncol(train_mat), function(t) lowertri2mat(train_mat[,t], p, diag = TRUE))
pi_mat = matrix(0.9, p, p)
train_eta_list = lapply(1:length(train_list), function(t) gen.missing(pi_mat, symm = TRUE))
train_miss_list = lapply(1:length(train_list), function(t) train_eta_list[[t]] * train_list[[t]])
pi_lb_hat = quantile(Reduce("+", train_eta_list)/train_obs_num, 0.05) # estimator of pi_lb
pi_ub_hat = quantile(Reduce("+", train_eta_list)/train_obs_num, 0.95) # estimator of pi_ub
C_lambda = 2/3
lambda = lambda.network.missing(1, length(train_miss_list), length(train_miss_list), 0.05,
rho = 0.509, pi_ub = pi_ub_hat, p, C_lambda)
graphon_miss_impute = softImpute.network.missing(train_miss_list, train_eta_list, lambda, 1)
graphon_miss_hat = graphon_miss_impute$u %*% diag(as.numeric(graphon_miss_impute$d)) %*%
t(graphon_miss_impute$v)
rho_hat = quantile(graphon_miss_hat, 0.95)
rank_hat = sum(graphon_miss_impute$d != 0)
alpha_grid = c(0.05)
permu_num = 10
threshold_len = 30
temp = calibrate.online.network.missing(train_miss_list, train_eta_list, threshold_len, alpha_grid,
permu_num, pi_lb_hat, pi_ub_hat, rho_hat, rank_hat, C_lambda, delta = 5)