These functions identify nodes belonging to (some level of) the core of a network:

  • node_by_core() returns a continuous measure of how closely each node resembles a typical core node.

  • node_by_kcoreness() assigns nodes to their level of k-coreness.

node_by_kcoreness(.data)

node_by_core(.data, coreness = NULL, direction = c("all", "out", "in"))

Arguments

.data

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().

coreness

Which method to use to calculate nodes' coreness. One of "correlation", "rich", "transition", or "hub"; see method_coreness for what each does. By default NULL, which uses "rich" for a weighted, directed, or two-mode network, since it is the only method that reads those properties directly, and "correlation" otherwise.

direction

One of "all" (the default), "out", or "in". For a directed network, "out" scores nodes on the ties they send and "in" on the ties they receive. Ignored for undirected and two-mode networks.

Value

A node_measure numeric vector the length of the nodes in the network, providing the scores for each node. If the network is labelled, then the scores will be labelled with the nodes' names.

The object also carries the measure it computed, the range its values can fall within, and whether and how those values were normalized. These are shown as a one-line header when the object is printed. Where a measure offers a choice between several ways of counting the same thing, it also carries the variant it used. All can be retrieved with attr().

k-coreness

k-coreness captures the maximal subgraphs in which each vertex has at least degree k, where k is also the order of the subgraph. As described in igraph::coreness, a node's coreness is k if it belongs to the k-core but not to the (k+1)-core.

Coreness

Where node_is_core() forces a yes or no answer, node_by_core() grades how core-like each node is on a scale from 0 to 1. The two agree on which method to use and read the same coreness and direction arguments, so the mark is always the cut of the measure returned here.

Each method uses as much of the network as it can. The rich-core and hub methods read tie weights and tie direction directly. The correlation and transition methods compare the network against a symmetric ideal, so they symmetrise a directed network and say that they have done so. To keep a method from using a property, transform the network first with e.g. manynet::to_undirected() or manynet::to_unweighted().

This function was called node_by_coreness() prior to version 1.0.0. It is now named for the property, as node_is_core() and node_in_core() are, which also frees "coreness" from meaning two different things: the continuous score here, and the peeling depth of node_by_kcoreness().

References

On k-coreness

Seidman, Stephen B. 1983. "Network structure and minimum degree". Social Networks, 5(3), 269-287. doi:10.1016/0378-8733(83)90028-X

Batagelj, Vladimir, and Matjaz Zaversnik. 2003. "An O(m) algorithm for cores decomposition of networks". arXiv preprint cs/0310049. doi:10.48550/arXiv.cs/0310049

Examples

node_by_kcoreness(ison_adolescents)
#> # K-coreness [0, Inf)
#> ▃▁▁▁▅ 
#>   Betty   Sue Alice  Jane  Dale   Pam Carol  Tina
#> 1     1     2     2     2     2     2     1     1
node_by_core(ison_adolescents)
#> # Coreness, scaled [0, 1]
#> ▃▁▁▂▁ 
#>   Betty   Sue Alice  Jane  Dale   Pam Carol  Tina
#> 1 0.065 0.652     1 0.398 0.617 0.412     0     0
node_by_core(ison_networkers, direction = "out")
#> # Coreness, scaled [0, 1]
#> ▆▂▁▁▁ 
#>   `Lin Freeman` `Doug White` `Ev Rogers` `Richard Alba` `Phipps Arabie`
#> 1             1        0.352       0.002          0.102           0.046
#> # ... and 27 more values from this nodeset. Use `print_all(...)` to print all values.