开始使用免费开始使用

Transitivity

In this exercise you will compute the network's transitivity, or clustering coefficient, both on the node level and on the global level.

本练习是课程的一部分

Predictive Analytics using Networked Data in R

查看课程

练习说明

  • Extract the transitivity of each node in the network using the transitivity() function and add it to the network object as a node attribute called transitivity.
  • 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().

交互式实操练习

通过完成这段示例代码来试试这个练习。

# Extract the local transitivity
___(___)$transitivity <- ___(network, type=___, isolates='zero')

# Compute the network's transitivity
___(network)
编辑并运行代码