hanaml.LinkPredict {hana.ml.r} | R Documentation |
hanaml.LinkPredict is an R wrapper for PAL link prediction algorithm.
hanaml.LinkPredict(conn.context, data, used.cols = NULL, method, katz.beta = NULL, min.score = NULL)
conn.context |
|
data |
|
used.cols |
|
method |
|
katz.beta |
|
min.score |
|
Predicting potential missing links between different nodes is a common task in social network analysis. Link prediction algorithms compute the distance of any two nodes using existing links in a social network, and make prediction on the missing links based on these distances..
result: DataFrame
The data frame that contains the computed scores of all missing links in a network.
## Not run: Social networks data that contain existing links between nodes:\cr > df NODE1 NODE2 1 1 2 2 1 4 3 2 3 4 3 4 5 5 1 6 6 2 7 7 4 8 7 5 9 6 7 10 5 4 Creating a LinkPredict instance for predicting potential missing links between all nodes:\cr > lp <- hanaml.LinkPredict(conn.context = conn, data = df, used.cols = c(node1 = "NODE1", node2 = "NODE2"), method = "common.neighbors") Link prediction result:\cr > lp$result NODE1 NODE2 SCORE 1 1 3 0.2857143 2 1 6 0.1428571 3 1 7 0.2857143 4 2 4 0.2857143 5 2 5 0.1428571 6 2 7 0.1428571 7 4 6 0.1428571 8 3 5 0.1428571 9 3 6 0.1428571 10 3 7 0.1428571 11 5 6 0.1428571 ## End(Not run)