r
and s
in PAFit
.performCV(cv_data,
r = 10^c(-2,-1,0,1,2),
s = 10^c(-1,1,2,3,4),
stop_cond = 10^-7,
only_PAFit = TRUE,
silent = FALSE,
only_loglinear = FALSE,
...)
CV_Data
.c(0.01,0.1,1,10,100)
.
c(0.1,1,10,100,1000,10000)
.
10^-7
.
TRUE
then only perform the CV for PAFit full model. Default is TRUE
.
TRUE
then the progress is not printed out. Default is FALSE
.
TRUE
then only perform the CV assuming the linear functional form \(A_k = k^\alpha\). In this case, the search is one-dimensional, since we only have to find s
(given s
, \(\alpha\) and node fitnesses can be estimated). Default is FALSE
.
debug = TRUE
) to pass onto the PAFit
function.
library("PAFit")
net <- GenerateNet(N = 100 , m = 5 , mode = 1 , alpha = 0.5 , shape = 10, rate = 10)
data_cv <- CreateDataCV(net$graph) # create CV data
cv_result <- performCV(data_cv , r = c(0.1,1) , s = c(10) , only_PAFit = TRUE , stop_cond = 10^-2)
print(cv_result)
Run the code above in your browser using DataLab