Skip to main content
. 2022 Feb 25;10(3):551. doi: 10.3390/biomedicines10030551
Algorithm A2 Training algorithm of the cascade graph encoder.
  • 1:

    Input:   Set of Barcode-like Timelines {B}; Stride Size s; Kernel Size w; Max Iteration nmax

  • 2:

    Output:   Network Weights θEall, θDall

  • 3:

    Initialize network weights θEall, θDall

  • 4:

    n=0

  • 5:

    while n<nmax do

  • 6:

            B⟵ sample from {B}

  • 7:

            i=1

  • 8:

            while  (i1)s+wTmax(B)  do

  • 9:

                    Normal-training(i,B)

  • 10:

                    if  n is a multiple of ten then

  • 11:

                          Synthesize B˜heart and B˜vessels

  • 12:

                          Regularization-training(B˜heart,B˜vessels)

  • 13:

                    end if

  • 14:

                    n=n+1

  • 15:

                    i=i+1

  • 16:

            end while

  • 17:

    end while

  • 18:

    procedureNormal-training(i,B)

  • 19:

            minimizeθEall,θDalllmain(i,B;θEall,θDall)+R,θlrec(i,B(R);θ)

  • 20:

    end procedure

  • 21:

    procedureRegularization-training(B˜heart,B˜vessels)

  • 22:

            minimizeθEall,θDalllmain(0,B˜heart;θEall,θDall)+R,θlrec(0,B˜heart(R);θ)+lvpl(B˜heart;θEall)

  • 23:

            minimizeθEall,θDalllmain(0,B˜vessels;θEall,θDall)+R,θlrec(0,B˜vessels(R);θ)+lvpl(B˜vessels;θEall)

  • 24:

    end procedure