Skip to main content
. 2022 Nov 28;22(23):9272. doi: 10.3390/s22239272
Algorithm A1: MGANet for sleep staging
Input: An information network: GA=(N,C,A)
Output: Node vector fusion information representations f*
Initialization: i=0, training epochs I and labeled nodes yL
While iI do
    for a vertex vnV do
        fs,nσ(1Ll=1LNkmαNc,Nk(l)W(l)fNk)//Learn sleep vector for each spatial feature.
        fs,nA(F1,F2,,Fn)AS//Learn attention spatial feature representation.
        ft,n//Learn the sleep vector for each temporal feature by Equation (8).
        ft,nA(F1,F2,,FTr1)AS//Learn attention temporal feature representation.
    end
    ua(WNcGfNc,WNkGfNk)//Calculate attention coefficient.
    Pfsoftmax(FC(G(f)))//sleep stage probability distribution.
    f*AfPf//epoch features and transitional fusion information.
    i=i+1
end