开始使用免费开始使用

Visualizing Churners

In the previous exercises, you noticed that it can be difficult to visualize a large network. Now you will visualize only the churners in the network by conditioning on the churn attribute.

本练习是课程的一部分

Predictive Analytics using Networked Data in R

查看课程

练习说明

  • Create a new igraph object called churnerNetwork.
    • Use the function induced_subgraph() to generate a subgraph of the already existing network.
    • Select the nodes that have the node attribute churn equal to 1.
  • Visualize churnerNetwork using plot().

交互式实操练习

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

# Create a subgraph with only churners
churnerNetwork <- ___(network, 
                    v = V(network)[which(___(network)$___ == 1)])
                    
# Plot the churner network 
plot(___, vertex.label = NA, vertex.size = 2)
编辑并运行代码