開始使用免費開始

Personalized PageRank

在這個練習中,你將比較 PageRank 與個人化 PageRank 兩種演算法的差異。 你可以使用 boxplots 函式,它會用兩個盒狀圖分別顯示流失者(churners)與未流失者(non-churners)的分數分佈。 此函式有兩個參數:

  • damping:阻尼因子的數值。預設為 0.85。
  • personalized:布林參數,表示是否使用個人化 PageRank。當為 TRUE 時,重啟向量在網路中的流失者為 1,未流失者為 0。預設為 FALSE(亦即不個人化)。

本練習屬於課程

使用 R 進行網路化資料的預測分析

檢視課程

練習說明

  • 套用 boxplots 函式,查看阻尼因子 0.85 下的標準 PageRank 分數分佈。
  • 套用 boxplots 函式,查看阻尼因子 0.85 下的個人化 PageRank 分數分佈。
  • 套用 boxplots 函式,查看阻尼因子 0.2 下的標準 PageRank 分數分佈。
  • 套用 boxplots 函式,查看阻尼因子 0.99 下的個人化 PageRank 分數分佈。

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# Look at the distribution of standard PageRank scores
boxplots(damping = ___)

# Inspect the distribution of personalized PageRank scores
boxplots(damping = ___, personalized = ___)

# Look at the standard PageRank with damping factor 0.2
boxplots(damping = ___)

# Inspect the personalized PageRank scores with a damping factor 0.99
boxplots(___, ___)
編輯並執行程式碼