MulaiMulai sekarang secara gratis

Analyzing a network

You will construct a network starting from a transactional data source. Each line in the transactional data source transfers represents a money transfer between an originator and a beneficiary.

Despite the structured representation of the data, the relationships between originators and beneficiaries are hard to capture. Real life data sources contain billions of transactions making it impossible to extract correlations and useful insights.

Network visualization tools offer a powerful solution to make information hidden in networks easy to interpret and understand.

Latihan ini adalah bagian dari kursus

Fraud Detection in R

Lihat Kursus

Petunjuk latihan

  • Load the igraph library.
  • Get to know the data by printing the first rows of transfers.
  • Create an undirected graph net from the data frame transfers with graph_from_data_frame().
  • Plot the network net with the vertex labels in "black" and bold by setting the font size equal to 2.

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Load the igraph library
library(___)

# Have a look at the data
___(___)

# Create an undirected network from the dataset
net <- ___(___, directed = ___)

# Plot the network with the vertex labels in bold and black
plot(___,
     vertex.label.color = ___,
     vertex.label.font = ___)
Edit dan Jalankan Kode