Skip to main content

Table 8 The pseudo-code of DPDDI

From: DPDDI: a deep predictor for drug-drug interactions

Input: DDI network A

 The parameters: learning rate, epochs, dropout, batch-size, input-dim, hidden-dim, output-dim (both in Feature extractor and Predictor)

Output: DDI network \( \hat{\mathrm{A}} \) reconstructed by DPDDI

 1: Initialize parameter sets W(0) and W(1) in Feature extractor.

 2: Learn drug representations Z.

 3: for epoch in epochs (Feature extractor in Table 1.):

 4: Compute the loss function based on Eq. 2.

 5: Calculate gradient and adopt Adam optimizer to update W(0) and W(1).

 6: end for

 7: Obtain the representations Z of drugs according to Eq. 4 and Eq. 5.

 8: for each drug pair, do

 9: Feature aggregation by concatenating operation.

 10: end for

 11: Initialize parameter sets in Predictor based on DNN.

 12: Feed representation vector of each drug pair into Predictor.

 13: for epoch in epochs (Predictor in Table 1.):

 14: Compute the loss function based on Eq. 3.

 15: Calculate gradient and adopt Adam optimizer to update parameter sets .

 16: end for

 17: Obtain the DDI network \( \hat{\mathrm{A}} \).