ECV.Rank {randnet} | R Documentation |
estimates optimal low rank model for a network
Description
estimates the optimal low rank model for a network
Usage
ECV.Rank(A, max.K, B = 3, holdout.p = 0.1, weighted = TRUE,mode="directed")
Arguments
A |
adjacency matrix |
max.K |
maximum possible rank to check |
B |
number of replications in ECV |
holdout.p |
test set proportion |
weighted |
whether the network is weighted. If TRUE, only sum of squared errors are computed. If FALSE, then treat the network as binary and AUC will be computed along with SSE. |
mode |
Selectign the mode of "directed" or "undirected" for cross-validation. |
Details
AUC is believed to be more accurate in many simulations for binary networks. But the computation of AUC is much slower than SSE, even slower than matrix completion steps.
Note that we do not have to assume the true model is low rank. This function simply finds a best low-rank approximation to the true model.
Value
A list of
sse.rank |
rank selection by SSE loss |
auc.rank |
rank selection by AUC loss |
auc |
auc sequence for each rank candidate |
sse |
sse sequence for each rank candidate |
Author(s)
Tianxi Li, Elizaveta Levina, Ji Zhu
Maintainer: Tianxi Li tianxili@virginia.edu
References
T. Li, E. Levina, and J. Zhu. Network cross-validation by edge sampling. Biometrika, 107(2), pp.257-276, 2020.
See Also
Examples
dt <- BlockModel.Gen(30,300,K=3,beta=0.2,rho=0.9,simple=FALSE,power=TRUE)
A <- dt$A
ecv.rank <- ECV.Rank(A,6,weighted=FALSE,mode="undirected")
ecv.rank