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

Compute heterophilicity

Similar to dyadicity, heterophilicity is the ratio between the actual number of mixed label edges and the expected number of mixed label edges. In this exercise, you will compute the network's heterophilicity.

For the expected number of mixed edges, use the formula \(n_ {NC}\cdot n_ {C}\cdot p\) where \(n_ {NC}\) is the number of non-churners, \(n_ {C}\) is the number of churners and p is the connectance.

You can use the variables NonChurnNodes, ChurnNodes, connectance, and MixedEdges.

Bu egzersiz

Predictive Analytics using Networked Data in R

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

Egzersiz talimatları

  • Compute the expected number of mixed edges and assign it to the variable ExpectedHet.
  • Compute the heterophilicity by dividing the actual number of mixed edges with the expected number of mixed edges. Call this variable Het.
  • Is the network heterophilic? Inspect Het to find out.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Compute the expected heterophilicity
ExpectedHet <- ___ * ___ * ___
 
# Compute the heterophilicity
Het <- ___ / ___
 
# Inspect the heterophilicity
___
Kodu Düzenle ve Çalıştır