เริ่มต้นใช้งานเริ่มต้นใช้งานได้ฟรี

Adding network features

Enriching data with network features and other kinds of variables improves a model's ability to detect fraud.

The network net is based on the transactional dataset transfers from different accounts. The data account_info contains details on these accounts which are the nodes of the network. You can add network features to account_info like degree, closeness and betweenness.

แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร

Fraud Detection in R

ดูคอร์ส

คำแนะนำการฝึกหัด

  • Plot network net and print account_info which contains information about the accounts (i.e. nodes).
  • Add features degree, closeness and betweenness to data frame account_info as the normalized degree, closeness and betweenness respectively.
  • Show the new features of the accounts (i.e. nodes) by printing account_info.

แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ

ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์

# Plot network and print account info
___
legend("bottomleft", legend = c("known money mule", "legit account"), fill = c("darkorange", "lightblue"), bty = "n")
print(___)

# Degree
account_info$___ <- ___(___, normalized = ___)

# Closeness
account_info$___ <- ___(___, ___ = ___)

# Betweenness
account_info$___ <- ___(___, ___ = ___)

print(___)
แก้ไขและรันโค้ด