Fraud Detection in R
Tim Verdonck
Professor Data Science at KU Leuven
Shortest path between nodes, e.g. between A and I
shortest_paths(network, from = "A", to = "I")
A C G I
degree(network)
A
2
degree(network)
A B
2 2
degree(network)
A B C
2 2 1
degree(network)
A B C D
2 2 1 3
If Network has $N$ nodes, then normalizing degree means dividing by $N-1$. Here divide by 3:
degree(network, normalized = TRUE)
A B C D
0.66667 0.66667 0.33333 1.00000
Inverse distance of a node to all other nodes in the network
Inverse distance of a node to all other nodes in the network
closeness(network)
A
0.25
Inverse distance of a node to all other nodes in the network
closeness(network)
A B
0.25 0.25
Inverse distance of a node to all other nodes in the network
closeness(network)
A B C
0.25 0.25 0.20
Inverse distance of a node to all other nodes in the network
closeness(network)
A B C D
0.25 0.25 0.20 0.33
Inverse distance of a node to all other nodes in the network
closeness(network)
A B C D
0.25 0.25 0.20 0.33
closeness(network, normalized = TRUE)
A B C D
0.75 0.75 0.60 1.00
Number of times that a node or edge occurs in the geodesics of the network
Number of times that a node or edge occurs in the geodesics of the network
betweenness(network)
A E
0 0
Number of times that a node or edge occurs in the geodesics of the network
betweenness(network)
A B E
0 3 0
Number of times that a node or edge occurs in the geodesics of the network
betweenness(network)
A B C E
0 3 4 0
Number of times that a node or edge occurs in the geodesics of the network
betweenness(network)
A B C D E
0 3 4 3 0
Fraud Detection in R