Transitivity
In this exercise you will compute the network's transitivity, or clustering coefficient, both on the node level and on the global level.
Diese Übung ist Teil des Kurses
Predictive Analytics using Networked Data in R
Anleitung zur Übung
- Extract the transitivity of each node in the network using the
transitivity()
function and add it to thenetwork
object as a node attribute calledtransitivity
. - Make sure you use the type
local
. - To avoid NA values, specify that isolated nodes should get the value
zero
. - Compute the global transitivity of the network using the function
transitivity()
.
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
# Extract the local transitivity
___(___)$transitivity <- ___(network, type=___, isolates='zero')
# Compute the network's transitivity
___(network)