Skip to main content
. 2019 May 18;19(10):2300. doi: 10.3390/s19102300
Algorithm 1: The proposed PL-assisted clustering algorithm.
Input: offline RSS fingerprints {RSS1,RSS2,,RSSN};
    position labels of offline RSS fingerprints L={L1,L2,,LN};
    number of prototype vectors Q;
    initialized prototype vector set V={V1,V2,,VQ};
    position labels of prototype vectors T={T1,T2,TQ};
    learning rate α(0,1);
1: repeat
2:   randomly select an offline RSS fingerprint from the database;
3:   calculate the Euclidean distance between the selected RSSi and all prototype vectors:
4:   find the prototype vector Vj closest to the selected RSSi:
5:   if Li=Tj
6:    Vj=Vj+α(RSSiVj);
7:   else
8:    Vj=Vjα(RSSiVj);
9:   end
10:    the prototype vector Vj is updated as Vj;
11:    return to line 2;
12: until achieve the maximum number of iterations or the update range of the prototype vectors is very little;
Output: the final prototype vector {V1,V2,,VQ};