Skip to main content
. 2022 Jan 15;12(2):201. doi: 10.3390/ani12020201
Algorithm 2 Improved splicing method
  •       1:

    Input: An individual A, i.e., A=[f1,f2,,fp], fj{0,1}, Sample Xn×p, Yn×1, threshold τ; Maximal size of the subset of genes Smax;

  •       2:

    The individual A is divided into active set A={fi|fi=1,i=1,,p} and inactive set I={fi|fi=0,i=1,,p};

  •       3:

    if |A|>Smax  then

  •       4:

        Calculate the score of each gene in active set A in terms of backward sacrifice.

  •       5:

        Delete |A|Smax genes of the lowest score in active set A to obtain a new active set A; Then deleted |A|Smax genes are added into inactive set I to obtain a new inactive set I.

  •       6:

        βA=(XATXA)1XATY, dI=XIT(YXAβA)/n, where XAn×|A|, XIn×|I|;

  •       7:

    else

  •       8:

        βA=(XATXA)1XATY, dI=XIT(YXAβA)/n, where XAn×|A|, XIn×|I|;

  •       9:

    end if

  •       10:

    repeat

  •       11:

        Calculate Loss function L=L0=12n||YXAβA||22;

  •       12:

        Calculate the score ξj of each gene in active set A in terms of backward sacrifice.

  •       13:

        Calculate the score of each gene ζj in inactive set I in terms of forward sacrifice.

  •       14:

        for  k=1,2,,min(|A|,|I|) do

  •       15:

           Ak={jA:iAI(ξjξi)k}, Ik={jI:iII(ζjζi)k};

  •       16:

           A˜=(AAk)Ik, I˜=(IIk)Ak, d˜I˜=XI˜T(YXA˜βA˜), β˜A˜=(XA˜TXA˜)1XA˜TY;

  •       17:

           Calculate Loss function Ln=12n||YXA˜β˜A˜||22;

  •       18:

           if  Ln<L  then

  •       19:

              βA=β˜A˜, dI=d˜I˜, A=A˜, I=I˜, L=Ln;

  •       20:

           end if

  •       21:

        end for

  •       22:

    until  L0L<τ

  •       23:

    Merge active set A with inactive set I to generate a new individual A.

  •       24:

    Output: A new individual A.