开始使用免费开始使用

Probabilistic Relational Neighbor Classifier

In this exercise, you will apply the probabilistic relational neighbor classifier to infer churn probabilities based on the prior churn probability of the other nodes.

Instead of knowing the nodes' labels, suppose you know each node's probability of churn, as in the image below. In the image, C stands for churn and NC for non-churn. Then, as before, you can update the churn probability of the nodes by finding the average of the neighboring nodes' churn probabilities.
Probabilistic relational neighbor classifier

本练习是课程的一部分

Predictive Analytics using Networked Data in R

查看课程

练习说明

  • Find the churn probability of the 44th customer in the vector churnProb.
  • Update the churn probability by multiplying AdjacencyMatrix by churnProb and dividing with the vector neighbors which contains the neighborhoods' sizes. We have added as.vector() around the matrix operations. Assign the result to churnProb_updated.
  • Find the updated churn probability of the 44th customer in the vector churnProb_updated.
  • What happened to the churn probability of the 44th customer?.

交互式实操练习

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

# Find churn probability of the 44th customer
churnProb[___]

# Update the churn probabilties and the non-churn probabilities
churnProb_updated <- as.vector((AdjacencyMatrix %*% ___) / ___)

# Find updated churn probability of the 44th customer
churnProb_updated[___]
编辑并运行代码