BaşlayınÜcretsiz Başlayın

Relational Neighbor Classifier

In this exercise, you will apply a simple network based classifier called the relational neighbor classifier. It uses the class labels of neighboring nodes to compute a churn probability for each node in the network.
For example, in the network below where red nodes denote churners and white nodes denote non-churners, the churn probability of the blue node is 0.4.

Relational neighbor classifier

You are given two vectors: ChurnNeighbors and NonChurnNeighbors with each customer's number of neighbors that have churned and not churned, respectively.

Bu egzersiz

Predictive Analytics using Networked Data in R

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Compute the churn probability of each customer, churnProb, using the relational neighbor classifier.
  • Use which() to find the customers with the highest probability of churning. Call this vector mostLikelyChurners.
  • Use mostLikelyChurners to find the IDs of the customers with the highest churn probability.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Compute the churn probabilities
churnProb <- ___ / (ChurnNeighbors + ___)

# Find who is most likely to churn
mostLikelyChurners <- which(churnProb == ___(churnProb))

# Extract the IDs of the most likely churners
customers$id[___]
Kodu Düzenle ve Çalıştır