These functions create a vector of nodes' memberships in cliques:
node_in_roulette() assigns nodes to maximally diverse groups.
node_in_roulette(.data, groups, group_size, times = NULL, num_groups = NULL)A network object of class stocnet, igraph, tbl_graph, network, or similar.
Internally any of these will be coerced to an efficient implementation.
For more information on possible coercions, see e.g. manynet::as_stocnet().
An integer indicating the number of groups desired.
An integer indicating the desired size of most of the groups. Note that if the number of nodes is not divisible into groups of equal size, there may be some larger or smaller groups.
Integer scalar, how many times the algorithm repeats its work. Where the algorithm is stochastic, this is how many times it runs, and the best or the most frequent result is kept. Where the algorithm searches, this is how many steps the search takes. More repetitions give a more reliable result and take longer, so each function documents its own default.
Deprecated. The former spelling of groups.
Still accepted, but warns; please use groups instead.
A node_member character vector the length of the nodes in the network,
of group memberships "A", "B", etc for each node.
If the network is labelled,
then the assignments will be labelled with the nodes' names.
times defaults to the number of nodes multiplied by the number of groups.
This heuristic may be insufficient for small networks and numbers of groups,
and burdensome for large ones, but can be overwritten.
At every 10th iteration, a stronger perturbation of a number of successive
changes, approximately the number of nodes divided by the number of groups,
takes place whether or not it improves the objective function.
This well known computational problem is a NP-hard problem with a number of relevant applications, including the formation of groups of students that have encountered each other least or least recently. Essentially, the aim is to return a membership of nodes in cliques that minimises the sum of their previous (weighted) ties:
$$\sum_{g=1}^{m} \sum_{i=1}^{n-1} \sum_{j=i+1}^{n} x_{ij} y_{ig} y_{jg}$$
where \(y_{ig} = 1\) if node \(i\) is in group \(g\), and 0 otherwise.
\(x_{ij}\) is the existing network data. If this is an empty network, the function will just return cliques. To run this repeatedly, one can join a clique network of the membership result with the original network, using this as the network data for the next round.
A form of the Lai and Hao (2016) iterated maxima search (IMS) is used here. This performs well for small and moderately sized networks. It includes both weak and strong perturbations to an initial solution to ensure that a robust solution from the broader state space is identified. The user is referred to Lai and Hao (2016) and Lai et al (2021) for more details.
Lai, Xiangjing, and Jin-Kao Hao. 2016. “Iterated Maxima Search for the Maximally Diverse Grouping Problem.” European Journal of Operational Research 254(3):780–800. doi:10.1016/j.ejor.2016.05.018 .
Lai, Xiangjing, Jin-Kao Hao, Zhang-Hua Fu, and Dong Yue. 2021. “Neighborhood Decomposition Based Variable Neighborhood Search and Tabu Search for Maximally Diverse Grouping.” European Journal of Operational Research 289(3):1067–86. doi:10.1016/j.ejor.2020.07.048 .
Other memberships:
member_brokerage,
member_community,
member_community_hier,
member_community_non,
member_components,
member_core,
member_diffusion,
member_equivalence
Other nodal:
mark_core,
mark_degree,
mark_diff,
mark_nodes,
mark_select_node,
measure_assort_node,
measure_broker_node,
measure_brokerage,
measure_central_between,
measure_central_close,
measure_central_degree,
measure_central_eigen,
measure_closure_node,
measure_core,
measure_diffusion_node,
measure_diverse_node,
member_brokerage,
member_community,
member_community_hier,
member_community_non,
member_components,
member_core,
member_diffusion,
member_equivalence,
motif_brokerage_node,
motif_clique,
motif_composition,
motif_exposure,
motif_node,
motif_path
node_in_roulette(ison_adolescents, groups = 3)
#> 3 groups
#> Betty Sue Alice Jane Dale Pam Carol Tina
#> 1 B A C A B B C C