# An Overview of IoT Sensor Data Processing, Fusion, and Analysis Techniques
## 3 IoT Sensor Data Processing
### Missing Data Imputation
Finally, if the data arriving from the sensor do contain any missing value in the updating phase, then the model updates the new data. It then stores this in a reference database. Probabilistic Matrix FactorizationThere are two major advantages of using probabilistic matrix factorization (PMF) [30] for handling missing IoT sensor data. First is the dimensionality reduction, which is the underlying property of matrix factorization. The second is that the original matrix can be replicated using the factored matrices product. This method is used to recover the values missing in the original matrix. PMF is performed on the preliminarily assigned sensors. The neighboring sensors' data are examined for similarity, and are grouped into a different class of clusters using the K-means algorithm. The K-means clustering algorithm groups the sensors into separate classes according to their measuring similarity. Analyzing the patterns of neighboring sensors helps to recover missing sensor data. Then, a probabilistic matrix factorization algorithm (PMF) is implemented in each cluster. PMF standardizes the data and restricts the probabilistic distribution of random features. The workflow of the algorithm is illustrated in Figure 4.  
Figure 4: The workflow of the PMF model. In the algorithm, PMF is used to factorize a single matrix into the product of two matrices. The dimensionality can be reduced by factorization. The ability to obtain the original matrix from the product of two factored matrices can be used to recover the missing values in the original matrix. The original matrix is represented as P NNM. Now generate two random matrices, U and V, such that P' = U. V T, where U and V are of dimension NxK and KvM, respectively. K is an integer which represents the number of latent feature column-vectors in U and V. The missing data points in the original matrix are represented as an identity matrix, I having the same dimension as the original matrix P. The values in the Iij matrix are defined using the following rule, as depicted in Equation (5). \[I_{ij}=\left\{ \begin{array}{ll}1,\text{ {if }}P_{ij\text{ {is not missing}}}\\ 0,\text{ {if }}P_{ij\text{ {is missing}}}\end{array} \right. \tag{5}\]  
Next, compute the root mean square error (RMSE) between the P and P', which is given in Equation (6) below. \[RMSE=\sum\
olimits_{i=1}^{N}\sum\
olimits_{j=1}^{M}I_{ij}\left(P_{ij}-U_{i}V_{ j}^{T}\right)^{2} \tag{6}\]  
The result obtained using Equation (1) is compared with \(RMSE_{max}\), which is the maximum acceptable error. The algorithm will terminate if RMSE is \(\leq RMSE_{max}\). Otherwise, the values of U and V are updated using the Equations (7) and (8). \[U^{\prime}=U_{i}+\gamma.\frac{\partial RMSE_{ij}}{\partial U_{i}} \tag{7}\]  
\[V^{\prime}=V_{j}+\gamma.\frac{\partial RMSE_{ij}}{\partial V_{j}} \tag{8}\]  
where \(\gamma\) denotes the adjustment factor that decides how much the U and V values need to be adjusted. Steps four to six are repeated until the RMSE is less than or equal to \(RMSE_{max}\). A large value of \(\gamma\) may result in low precision, while a value that is too small may result in too many iterations. The authors in [31] addressed the issue of missing value in IoT sensors. In IoT sensor networks, single-mode failures cause data loss due to the malfunction of several sensors in a network. The authors proposed a multiple segmented imputation approach, in which the data gap was identified and segmented into pieces, and then imputed and reconstructed iteratively with relevant data. The experimental results exhibited significant improvements over the conventional technique of root mean square.