
Control parameters for network histogram algorithms
nethist_control.RdConstructs a control object for nethist,
multinethist, and hnethist.
Usage
nethist_control(
algorithm = "greedy",
max_itr = 5e+06,
greedy_swap_rule = "single_random",
greedy_stop_threshold = 20000,
verbose = FALSE,
...
)
# S3 method for class 'nethist_control'
print(x, ...)Arguments
- algorithm
character. Optimization algorithm. Currently only
"greedy"is implemented.- max_itr
integer. Maximum number of iterations. Default is \(5 \times 10^6\).
- greedy_swap_rule
character. Vertex-pair selection rule for the greedy search. At each iteration, two vertices are drawn and their group labels are swapped if the move improves the objective. Currently only
"single_random"(one pair drawn uniformly at random) is implemented.- greedy_stop_threshold
integer. Early stopping criterion for the greedy search; the algorithm terminates if the objective has not improved for this many consecutive iterations. Default is 20,000.
- verbose
logical. Print progress messages during fitting.
- ...
Accepts deprecated argument names
swap_ruleandconsecutive_iter_thresholdwith a warning.- x
a
nethist_controlobject.
Examples
# default control object
ctrl <- nethist_control()
print(ctrl)
#> nethist control parameters:
#> algorithm : greedy
#> max_itr : 5e+06
#> greedy_swap_rule : single_random
#> greedy_stop_threshold: 20000
#> verbose : FALSE
# reduce iteration limit for quick testing
ctrl <- nethist_control(max_itr = 1e4, greedy_stop_threshold = 100)
# \donttest{
data(polblog)
fit <- nethist(polblog, control = nethist_control(max_itr = 1e4))
# }