Skip to main content
. 2022 Jun 22;24(7):859. doi: 10.3390/e24070859
Algorithm 1 Proposed information topology SLU estimation algorithm
  • 1:

    procedureInfTopSentenceBounds(Πh)         ▹ Estimate contextual SLU bounds

  • 2:

        for all gΠh do                   ▹ Do for all contextual data Πh

  • 3:

            uv,uzgΠh                   ▹ Read new set of symbols

  • 4:

            uv^,uz^uv,uz       ▹ Obtain topological set of new unique symbols

  • 5:

            pv^,pz^fsuv,uz         ▹ Functional spline match distributions

  • 6:

            HD(v^,z^)pv^,pz^       ▹ Normalized relative difference entropy

  • 7:

            Id(ϕ)I0(ψ)I0(ψ¯(NL))            ▹ Incremental information

  • 8:

            I^(ϕ;n)Id               ▹ Cumulative incremental information

  • 9:

            W˜d1ϕ;n=W˜1(ψ;n)W˜1(ψ¯;n1)  ▹ Incr. norm. Wasserstein-1 distance

  • 10:

            W^1(ϕ;n)W˜d1ϕ;n              ▹ Cumulative W-1 distance

  • 11:

            θ˜1ϕ;n=arctanW^1(ϕ;n)         ▹ Curvature of the W-1 distance tangent

  • 12:

        end for

  • 13:

        I¯ϕ;nmeanI^(ϕ;n)           ▹ Mean cumulative information

  • 14:

        θ¯ϕ;nmeanθ˜1(ϕn;n)         ▹ Mean incremental W-1 distance

  • 15:

        Ψ(ϕN)ΣI¯ϕ;n,θ¯ϕ;n    ▹ Covariance of incr. info and W-1 distance

  • 16:

        ωl=I¯ϕ;nαψw

  • 17:

        ωb=θ¯ϕ;nαψh

  • 18:

        ωw=αψw

  • 19:

        ωh=αψh

  • 20:

        Ω(ϕN)=ωl,ωb,ωw,ωh          ▹ Compute decision bounds over Πh

  • 21:

    end procedure

  • 22:

    procedureInfTopSentence(Gs,Ωϕ)          ▹ Estimate SLU for current data

  • 23:

        for all gGs do                    ▹ Do for all local data Gs

  • 24:

            uv,uzgGs                  ▹ Read new set of symbols

  • 25:

            uv^,uz^uv,uz       ▹ Obtain topological set of new unique symbols

  • 26:

            pv^,pz^fsuv,uz        ▹ Functional spline match distributions

  • 27:

            HD(v^,z^)pv^,pz^           ▹ Norm. relative difference entropy

  • 28:

            Id(ϕ)I0(ψ)I0(ψ¯(NL))             ▹ Incremental information

  • 29:

            I^(ϕ;n)Id                ▹ Cumulative incremental information

  • 30:

            W˜d1ϕ;n=W˜1(ψ;n)W˜1(ψ¯;n1)       ▹ Incr. norm. W-1 distance

  • 31:

            W^1(ϕ;n)W˜d1ϕ;n                ▹ Cumulative W-1 distance

  • 32:

            θ˜1ϕ;n=arctanW^1(ϕ;n)        ▹ Curvature of W-1 distance tangent

  • 33:

            Ω(ϕN)=ωl,ωb,ωw,ωh             ▹ Apply SLU decision bounds

  • 34:

            if I^ϕ;nωl and θ˜ϕ;nωt then         ▹ SLU decision test

  • 35:

               qϕ;n=1                      ▹ End of SLU detected

  • 36:

            end if

  • 37:

        end for

  • 38:

    end procedure