Skip to main content
. 2024 Apr 16;26(4):338. doi: 10.3390/e26040338
Algorithm 2 Greedy refining algorithm
  • 1:

    A←{1,…,|Y|}       // A starts by being the coarsest partition of Y, i.e., gA=Id.

  • 2:

    Front ←[A,ndef,…,ndef]       // Will contain the list of the |Y| partitions chosen during the execution

  • 3:

     

  • 4:

    for i∈{1,…,|Y|−1} do

  • 5:

        // Minimize over B splitting of A the slope between H(gA(Y)),R*(gA) and H(gB(Y)),R*(gB).

  • 6:

        A←argminB∈Split(A)R*(gB)−R*(gA)H(gB(Y))−H(gA(Y))

  • 7:

        Front[i]←A

  • 8:

     

  • 9:

    return Front      // A={1},…{|Y|} at this point