Optimization hyper-parameters
Here we discuss the different parameters that can be used to control the optimization process. The optimization greedily tries to find a good partition of the network. You can control the optimization process by setting the following parameters:
Starting node labels
NetworkHistogram.initialize_node_labels — Functioninitialize_node_labels(A, h, starting_assignment_rule::StartingAssignment)initialize node labels based on the starting_assignment_rule, and return a vector of node labels and a GroupSize object.
Implemenented rules
OrderedStart(): Sequentially assign nodes to groups based on the ordering ofA.RandomStart(): Randomly assign nodes to groups.EigenStart(): Assign nodes to groups based on the second eigenvector of the normalized Laplacian.DistStart(): Assign nodes to groups based on the Hamming distance between rows ofA.
The groups will be of size floor(h * n) where n is the number of nodes if h is a float. If h is an integer, the groups will be of size h. The last group may be smaller if n is not exactly divisible by the group size.
Swapping rule
NetworkHistogram.select_swap — Functionselect_swap(node_assignment::Assignment, A, ::NodeSwapRule)Selects two nodes to swap based on the NodeSwapRule, the adjacency matrix A and the current assignment node_assignment.
Implemented rules
RandomNodeSwap(): Select two nodes at random.
Acceptance rule
NetworkHistogram.accept_reject_update! — Functionaccept_reject_update!(history::GraphOptimizationHistory, iteration::Int,
proposal::Assignment,
current::Assignment, accept_rule::AcceptRule)Return the updated current assignment based on the accept_rule.
Implemented rules
Strict(): Accept the proposal if it has a higher likelihood than the current assignment.
Stopping rule
NetworkHistogram.stopping_rule — Functionstopping_rule(history, stop_rule::StopRule)Returns a Bool with true if we should stop the optimization based on the stop_rule.
Implemented rules
PreviousBestValue(k): Stop if the current iteration iskiterations away from the iteration with the best value.