# Edge-Nodes Representation Neural Machine for Link Prediction
## 4 Experiments and Results
### Baselines and Experimental Setting  
Supposing that the numbers of nodes and edges of a network are \(n\) and \(m\) respectively, there are at most \(n*(n-1)/2\) links in the network, and \(m\) links of them are observed and \(n*(n-1)/2-m\) links are unobserved. For each dataset, we divide the observed links called positive samples into two parts. Training set accounts for ninety percent and testing set accounts for ten percent. For the training set, we sample negative training samples from the unobserved links and set its number to be twice of \begin{table}
\begin{tabular}{c c c} \hline \hline
**Datasets** & 1 V1 & 1 E1 \\ \hline
**C.ele** & 297 & 2148 \\
**USAir** & 332 & 2126 \\
**PB** & 1222 & 16,714 \\
**NS** & 1589 & 2742 \\
**E.coli** & 1805 & 14,660 \\
**Yeast** & 2375 & 11,693 \\
**Power** & 4941 & 6594 \\
**Router** & 5022 & 6258 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The nodes and edges’ numbers of all the datasets. the number of positive training samples, as same as the testing set. We remove these testing links from the network, and we try to find out these missing links especially these positive testing links. We adopt AUC (area under the ROC curve) to evaluate the performance of link prediction, which is used frequently to evaluate the effect of binary classifier. AUC is equivalent to the probability that a randomly chosen positive example is ranked higher than a randomly selected negative example. AUC considers the ability of classifying positive and negative samples simultaneously, each sample is classified correctly if AUC is 1. To speak more intuitively, when we get a higher AUC value, indicating that the classifier can classify both positive sample and negative sample more accurately. AUC is not sensitive to whether it is unbalanced between the amounts of positive and negative samples. For the proposed method ENRNM, we set the nodes' amount of the subgraph as 10, which performs better than other integer settings when generating the representation of the edge. So the dimension of the edge's vector is \(10\times(10-1)/2=45\). And when generating the node's representation, the dimension of the node's vector is 45 too. The reason why we make these settings is that we want to express the idea that edge and nodes on the two sides of the edge have the same importance in representing a link. Besides, the Return parameter p and the In-out parameter q both is equal to 1. In the setting, node2 vec randomly walks in the graph and gives the same chance to the nodes which are near to the current node to be added into the node sentence. For the same training data, classifiers trained by various models are different. Before we determine using the neural network to learn link's formation mechanism, we conduct a series of experiments to find the most suitable classifier. The classifiers we use include logistic regression [32], decision tree [33], random forest [34], adaboost [35] and neural network. For random forest classifier, there are 100 trees in the forest. For the neural network, we use the structure of three fully connected layers with 32, 32, 16 hidden units, respectively. And in the end, we use SoftMax layer to output two probability values indicating whether there is a link or not. The activation function in the neural network we use is Rectified Linear Unit (ReLU). And we adopt the Adam update rule [36] for optimization with a learning rate of 0.001 at the beginning whose drop ratio is 0.9, a mini-batch size of 128, the training epochs of 200. To avoid overfitting, we use Dropout [37] and Early-stopping to learn more useful patterns. All the above are implemented by the neural network tool of MATLAB. The AUC results of different classifiers are shown in Table 3, we can see that the neural network is the most suitable classifier. Therefore, in the next experiments, we use the neural network as our classifier to learn meaningful and abundant patterns. In our experiments, we compare our method ENRNM with twelve heuristics including common neighbors (CN) [1], Jaccard (Jac.)