## 3 Materials and Methods
### Method
#### 3.2.2 Construction and Fusion of the Medical Knowledge Graph
We employed five knowledge graph completion methods: DistMult and ComplEx for semantic matching models, ConvE [25] and ConvTransE [26] for neural network models, and TransE for translational distance models. The ways that these methods encode entities and relations into a low dimensional vector space are different. However, those methods can also be used for knowledge reasoning. Translational distance models (TransE). TransE model defines a triple \((h,r,t)\) as a translation between head entity \(h\) and tail entity \(t\) through relation \(r\) in a continuous vector space. It is like the form of \(\mathbf{h}+\mathbf{r}\approx\mathbf{t}\), in which \(h,r,t\) is the embedding of \(h\), \(r\), and \(t\), respectively. The score function of TransE is \(s(h,r,t)=\|\mathbf{h}+\mathbf{r}-\mathbf{t}\|_{L_{1}/L_{2}}\). Either \(L_{1}\) or \(L_{2}\) norm can be employed. Semantic matching models (DistMult and ComplEx). DistMult is a relatively simple semantic matching models. The score function of the DistMult model is defined as \(s(h,r,t)=\langle\mathbf{h},\mathbf{r},\mathbf{t}\rangle\). DistMult is limited to symmetric relations, which make it unable to distinguish head and tail entities. ComplEx extends DistMult to the complex domain in order to improve this problem. The embeddings of Head and tail for the same entity are complex conjugates that enable the ComplEx model could capture asymmetric relations information. Its score function is defined as \(s(h,r,t)=\text{Re}(\langle\mathbf{h},\mathbf{r},\mathbf{t}\rangle)\), where \(\text{Re}()\) is a real part of a complex vector and \(k\) is a dimension of an embedding. Neural network models (ConvE and ConvTransE). ConvE is a relatively simple method among neural network models. The Score function of ConvE is defined as \(\psi_{r}(\mathbf{e}_{s},\mathbf{e}_{o})=f(\text{vec}(f([\overline{\mathbf{e} }_{s};\overline{\mathbf{r}}_{r}]\times\omega))\mathbf{W})\mathbf{e}_{o}\), where \(f()\) is the nonlinear activation function vec means to flatten the tensor into a vector and the \([]\) operator is to deform and splice the embedding \(e\) and \(r\). It projects embedding vectors to another spaces for characterization and, due to the powerful feature extraction capability of the convolution structure, it can obtain good link prediction results and obtain less parameter utilization. The ConvTransE model maintains the characteristics of translation, like TransE between entities and relationships on the basis of ConvE. The score function of ConvTransE is defined as \(f(\text{vec}(\mathbf{M}(e_{s},e_{r}))W)e_{o}\). \(f\) denotes a non-linear function. The feature map matrix is reshaped into a vector vec that is projected into a \(F^{L}\) dimensional space while using \(W\) for linear transformation. We employed these knowledge graph completion models to predict drug candidates that can potentially treat [PERSON]'s disease with the medical knowledge graph. The knowledge graph completion model can project the entities and relationships in the medical knowledge graph to the low-dimensional continuous vector space, and then predict the new treatment relations in medical entities from the medical knowledge graph. The processes and results of the experiment can be seen in the next section. \begin{table}
\begin{tabular}{c c c} \hline
**Data Sets** & **Medical Literature Data** & **Knowledge Fusion Data** \\ \hline Entities & 12,497 & 12,497 \\ Relations & 43 & 43 \\ triples & 115,300 & 165,901 \\ \hline \end{tabular}
\end{table} 
Table 1: Comparison of medical data sets before and after fusion.