PAFit_data
object, which contains summary statistics of the dataset, PAFit estimates the attachment function \(A_k\) and node fitness \(\eta_i\) by penalized log-likelihood maximization. It also infers the remaining uncertainties in the estimated results by approximating the confidence intervals of \(A_k\) and \(\eta_i\). Estimation of either the attachment function or node fitness in isolation are also supported. Estimation of the PA function with \(\eta_i = 1\) can be specified by setting only_PA = TRUE
. Estimation of node fitness with either \(A_k = k\) or \(A_k = 1\) can be specified by setting only_f = TRUE
.PAFit (net_stat,
only_PA = FALSE , only_f = FALSE ,
mode_f = "Linear_PA" ,
true_A = NULL , true_f = NULL ,
mode_reg_A = 0 , weight_PA_mode = 1 ,
s = 10 , lambda = 1 ,
auto_lambda = TRUE , r = 0.01 ,
alpha_start = 1 , start_mode_A = "Log_linear",
start_mode_f = "Constant" ,
auto_stop = TRUE , stop_cond = 10^-7 ,
iteration = 200 , max_iter = 2e+05 ,
debug = FALSE , q = 1 ,
step_size = 0.5 ,
normalized_f = FALSE , interpolate = FALSE)
"PAFit_data"
containing all the summary statistics summerized from the data by the function GetStatistics
.
TRUE
means that the attachment function \(A_k\) is estimated in isolation(fixing \(\eta_i = 1\)). Default is FALSE
.
TRUE
means that the fitness function is estimated in isolation. Default is FALSE
.
"Linear_PA"
, "Constant_PA"
or "Log_linear"
. In the first two cases, the PA function is fixed. If mode_f == "Linear_PA"
then \(A_k = k\) for \(k \ge 1\) and \(A_0 = 1\). If mode_f == "Constant_PA"
then \(A_k = 1\) for all \(k\). In the final case of mode_f == "Log_linear"
, we set \(A_k = k^\alpha\) for \(k \ge 1\) and \(A_0 = 1\). The value of \(\alpha\) is also estimated. Default values is "Linear_PA"
.
true_A
is supplemented, then only node fitnesses are estimated.
true_f
is supplemented, then only the PA function is estimated.
0
, 1
or 2
. Indicates which regularization term is used for the PA function. For the regularization function used in the PLOS ONE and SR paper, use 0
. Default value is 0
.weight_PA_mode == 0
, the regularization term for \(A_k\) is weighted by the total number of edges connected to degree \(k\) nodes. If weight_PA_mode == 1
, the regularization terms have uniform weights. Default value is \(0\).
s
for node fitness. Default value is 10
.
auto_lambda == TRUE
. Default value is 1
. lambda == 0
means no regularization for PA.
auto_lambda == TRUE
, lambda
will be determined automatically from the data by r
. Default is TRUE
.
r
for the PA function indicates the relative strength of the regularization term. From r
, the value of lambda
is automatically determined if auto_lambda == TRUE
. Default value is 0.01
.
1
."Log_linear"
(the initial PA function set to k^alpha_start) or "Random"
(the initial function is randomly sampled from a uniform distribution). Default value is "Log_linear"
."Constant"
(the initial node fitnesses are all set to 1
) or "Random"
(the initial node fitnesses are randomly sampled from a gamma distribution). Default value is "Constant"
.TRUE
auto_stop = TRUE
, the iterative algorithm stops when \(abs(h(ii) - h(ii + 1)) / (abs(h(ii)) + 1) < stop_cond\) where \(h(ii)\) is the value of the objective function at iteration \(ii\). We recommend to choose stop_cond at most equal to \(10^(- number of digits of h - 2)\), in order to ensure that when the algorithm stops, the increase in posterior probability is less than 1% of the current posterior probability. Default is 10^-7
.auto_stop == TRUE
. Default value is 20
.
2e+05
.
debug == TRUE
, the value of the objective function \(h\) is printed out at each step. Defaule is FALSE
.1
.0.5
.FALSE
.FALSE
.k
center_k
(before mapping back to \(A_k\))A
in each binmode_f != "Log_linear"
, this confidence interval is estimated from the log_linear fit (fitting \(log k\) to \(log A_k\)) using confint
function, so it has a popular meaning as a \(95\)-percentage confidence interval.mode_f == "Log_linear"
library("PAFit")
net <- GenerateNet(N = 50,m = 10, mode = 1, alpha = 0.5, shape = 100, rate = 100)
net_stats <- GetStatistics(net$graph)
result <- PAFit(net_stats, r = 0.01, s = 100)
summary(result)
Run the code above in your browser using DataLab