Skip to main content
. 2021 Dec 19;21(24):8475. doi: 10.3390/s21248475
Algorithm 2: The dynamic associate domain adaptation phase.
  • Input:

    The source domain label data Ds={H˜is,yis}i=1ns, the target domain label data Dt={H˜it,yit}i=1n and the target domain unlabelled data Dt={H˜it}i=n+1nt.

  • Output:

    Similarity loss Lsim.

- - - - - - - - - - - - - - - - - - - - - - - Step 1 - - - - - - - - - - - - - - - - - - - - - -

Mapped the data to same space by ϕ.

Si=ϕ({H˜is}i=1ns), Uj=ϕ({H˜it}i=1n), Lk=ϕ({H˜it}i=n+1nt)

Calculate similarity matrix Fij and Gik by dot product.

Fij=Si×Uj, Gik=Si×Lk

Calculate conversion probability matrix of the similarity matrix Fij and Gik by softmax function SM.

PijSU=P(Uj|Si)=SMcolumns(F)ij=exp(Fij)Σjexp(Fij)

PjiUS=P(Si|Uj)=SMrows(F)ij=exp(Fij)Σiexp(Fij)

PikSL=P(Lk|Si)=SMcolumns(G)ik=exp(Fik)Σkexp(Fik)

PkiLS=P(Lk|Uj)=SMrows(G)ik=exp(Fik)Σiexp(Fik)

- - - - - - - - - - - - - - - - - - - - - - - Step 2 - - - - - - - - - - - - - - - - - - - - - -

Calculate LSUS by conversion probability,PSUS is the round-trip probability and the label distribution Yij.

PSUS=(PSUPUS)ij=ΣnPinSUPniUS

Yij={0else1Siclass(Si)=class(Sj)

LSUS=Q(Yij,PSUS) Calculate LLS by conversion probability, PLS is the conversion probability and the label distribution JiK.

Jik={0else1Lkclass(Lk)=class(Si)

LLS=H(Jij,PLS)

- - - - - - - - - - - - - - - - - - - - - - - Step 3 - - - - - - - - - - - - - - - - - - - - - -

Combine LSUS and LLS as divergence loss Ldiv.

Ldiv=max[LSUS,LLS]

Calculate synchronize loss Lsyn.

Lsyn=H(PjUS,PjSU)PjSU=ΣjPijSU

PjUS=ΣjPijUST

Lsyn=Q(PjUS,PjSU)

Combine Ldiv and Lsyn as Lsim.

Lsim=βLdiv+(β1)Lsyn