Skip to main content
. 2021 Nov 25;22(23):12751. doi: 10.3390/ijms222312751
Algorithm 1 Costs learning.
Input (Learning Set, Initial edit costs, Max_Iter)
Output (Learnt edit costs)
  1. Initialise:

    iter=1.

    C1, …, Cn = Initial edit costs.

    WhileiterMax_Iter:

  2.   Classify all molecules with nearest neighbour and GED (Equation (1)) using C1,,Cn.

  3.   Compute Dj and Dj: (Equations (2) and (3)) for all Gj incorrectly classified.

  4.   Deduce Gi (Equation (4)).

  5.   Compute αt, t=1,,m and αt, t=1,,m: (Equation (12)).

  6.   Compute C¯1, …, C¯n (Equation (13)).

  7.   Update costs: Ct=C¯t,t=1,,n.

  8.   iter=iter+1.

    End While

End Algorithm