1. Learn
  2. /
  3. Courses
  4. /
  5. Fraud Detection in R

Exercise

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.

Instructions

100 XP
  • 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.