| Algorithm 1: Algorithm for Collecting Data from IoT Sensors in Smart Cities. |
|
Begin Input: A= {a1…an}-instance, R- result // training data For each instance Initially, the sensor finds a neighbour sensor, NN p (b, a) = p (b| a) p (a) //Compute the probability of b given a: The end for // testing data Repeat For ak ϵ A Compute p (b, a) = p (b, ak) p (a| b, ak) Get R☐ node NN Return class value Update classifier End for Until Convergence End. |