# Missing Value Imputation Based on Gaussian Mixture Model for the Internet of Things

Authors: Xiaobo Yan; Weiqing Xiong; Liang Hu; Feng Wang; Kuo Zhao
Journal: Mathematical Problems in Engineering
 (2015)

---

## Abstract

This paper addresses missing value imputation for the Internet of Things (IoT). Nowadays, the IoT has been used widely and commonly by a variety of domains, such as transportation and logistics domain and healthcare domain. However, missing values are very common in the IoT for a variety of reasons, which results in the fact that the experimental data are incomplete. As a result of this, some work, which is related to the data of the IoT, can’t be carried out normally. And it leads to the reduction in the accuracy and reliability of the data analysis results. This paper, for the characteristics of the data itself and the features of missing data in IoT, divides the missing data into three types and defines three corresponding missing value imputation problems. Then, we propose three new models to solve the corresponding problems, and they are model of missing value imputation based on context and linear mean (MCL), model of missing value imputation based on binary search (MBS), and model of missing value imputation based on Gaussian mixture model (MGI). Experimental results showed that the three models can improve the accuracy, reliability, and stability of missing value imputation greatly and effectively.


---

## Body

## 1. Introduction

Recently, with the rapid development of key technology of the Internet of Things, most platforms and systems, based on the Internet of Things, are widely applied to various fields and industries, such as intelligent transportation, smart buildings, healthcare field, positioning and navigation field, and logistics field [1–3]. Meanwhile, it generates a lot of urgent problems to be solved, and one of these problems is missing value imputation for the Internet of Things [4]. Most learning algorithms, which are used to analyze data collected in the Internet of Things, generally assume that data is complete so each attribute of all instances is filled with a valid value. However, missing values are very common in the IoT for a variety of reasons, which results in people not being able to use the experimental data normally. For this reason, the accuracy and reliability of the experimental results will be greatly reduced. Therefore, it is very necessary for the IoT to estimate missing values. Missing value imputation exists in various domains, such as computer and network domain [5], economy domain [6], medical domain [7], and psychological domain [8]. This paper addresses missing value imputation for the Internet of Things. In order to solve the problem, firstly, it is necessary to find the reasons for missing data [9]. There are many reasons for this phenomenon, such as unstable network communication, synchronization issues, unreliable sensors, and other equipment failure. Secondly, we need to study the mechanism of missing data [10]. Missing data mechanism can be divided into three categories: missing completely at random (MCAR), missing at random (MAR), not missing at random (NMAR). Thirdly, we have to study the pattern of missing data. Currently, there are two kinds of missing data patterns, and they are monotone missing pattern (MMP) and arbitrary missing pattern (AMP). Finally, we will have to establish missing value imputation model for the IoT and then give the estimated values of the missing data with the model. Missing values imputation algorithms, which are used commonly, are single imputation algorithm, multivariate imputation algorithm, and MCMC algorithm, and so forth.Data collected in the IoT has many features, such as temporal and spatial correlation, correlation between individual properties, and correlation between individual properties. However, most studies of missing value imputation did not take into account the characteristics of the IoT data itself. And missing value imputation in the IoT field is rarely seen. This paper, for the characteristics of the data itself and the features of missing data in IoT, divides the missing data into three types and defines three corresponding missing value imputation problems, and then we propose three new models and solutions to solve the corresponding problems. Experimental results showed that the three models can improve the accuracy, reliability, and stability of missing value imputation greatly and effectively.The rest of the paper is organized as follows: we first review the existing literature in Section2. In Section 3, we illustrate Gaussian mixture model based on expectation-maximization algorithm. In Section 4, we define the problems of missing value imputation for the IoT. In Section 5, we establish three models to solve the missing value imputation problems. We present our experiments in Section 6. Finally, we conclude our study in Section 7.


## 2. Related Work

Inspired by ROUSTIDA, which is an incomplete data analysis method without statistical analysis and probability analysis, literature [11] proposes a new method for missing data imputation based on incomplete data clustering (MIBOI). This method requires a prespecified key parameter, which is the upper limit of constraint tolerance set dissimilarity, but it is very difficult in practical application.Literature [12] proposes three data imputation algorithms based on the probabilistic path-event model to solve the problem of missing data imputation in RFID field. However, the matching algorithm, which is used by the data imputation algorithm, is inefficient.Researchers propose an imputation technique for missing data based on spatial-temporal and association rule mining (STARM) to solve the context data missing problem in [13]. This technique can lead to data overflow, but this paper did not deal with the issue of data overflow.To solve the problem of coverage holes in wireless sensor network (WSN), [14] proposes a new moving-neighborhood interpolation algorithm based on Delaunay triangulation technique. But this algorithm did not take into account the characteristics of the data itself.Literature [15] proposes a multiple regression model-based missing values imputation algorithm to estimate the missing data as accurately as possible in wireless sensor networks. The estimation performance of the algorithm is more stable and reliable, but this algorithm has many default preconditions.Literature [16] proposes a new single imputation algorithm based on locally linear reconstruction (LLR) to solve the problem of missing data imputation. This method can improve the prediction performance of missing values imputation, but it has to be used in a smaller range.In [17], researchers propose a novel nearest neighbor (NN) imputation algorithm to estimate missing values in wireless sensor network by learning spatial-temporal correlation between wireless sensor nodes. This method has no assumptions for the WSN applications, but researchers do not extend the approach to other fields, such as the Internet of Things. And this algorithm lacks analysis of correlation between the properties.


## 3. Background

### 3.1. Gaussian Mixture Model

Gaussian mixture model (GMM) is commonly used for clustering. Each GMM consists of several Gaussian distributions, and each of them is called a component, which represents a different cluster. All the components are linearly added together to form a probability density function (PDF) of GMM.There is a set of observed data, which isX
=
{
x
1
,
…
,
x
i
,
…
,
x
n
}. Each vector x
i is a p-dimensional vector. We assume that X is generated by a GMM with K components. The function f
k
(
x
i
) represents the probability density function of the k component, expressing the probability of x
i generated by the k component. So, the PDF of the GMM is as follows:
(1)
P
x
i
=
∑
k
=
1
K
π
k
f
k
(
x
i
∣
μ
k
,
ε
k
)
.In the above formula,π
k represents the weight of the k component in the GMM; μ
k and ε
k represent the mean vector and covariance matrix of the k component; P
x
i represents the probability of x
i generated by the GMM. Moreover, π
k satisfies the following conditions:
(2)
π
k
≥
0
,
∑
k
=
1
G
π
k
=
1
.The PDF of thek component f
k
(
x
i
∣
μ
k
,
ε
k
) is expressed as follows:
(3)
f
k
(
x
i
∣
μ
k
,
ε
k
)
=
exp
⁡
⁡
-
1
/
2
(
x
i
-
μ
k
)
T
∑
k
-
1
(
x
i
-
μ
k
)
(
2
π
)
p
/
2
ε
k
1
/
2
.


### 3.2. Expectation-Maximization Algorithm

Expectation-maximization algorithm (EM algorithm), formally proposed by Dempster, Laird, and Rubin in 1977, is an effective method to deal with incomplete data. EM algorithm is also a maximum likelihood estimation algorithm to solve model parameters from incomplete data. EM algorithm, with good local convergence, is simple and stable.The basic principle of EM algorithm can be expressed as follows:X is the data that we can observe, but it is incomplete.The complete data isY
=
(
X
,
Z
), and Z is the missing data. If θ is used to represent model parameter, P
(
θ
∣
X
) is the posterior distribution of θ with X. However, P
(
θ
∣
X
) is too complex to perform various statistical calculations. Assuming that the missing data Z is known, we can get a posterior distribution of θ, P
(
θ
∣
X
), which is relatively simple so that we can perform a variety of statistical calculations. Looking back, the assumption about the value of Z can be checked and improved. Following this cycle, we will convert a complex maximization problem to a series of simple maximization problems.There is a set of observed dataX
=
{
x
1
,
…
,
x
i
,
…
,
x
n
}, and data is independent from each other. The implicit category of the data, Z, is introduced, and Z
=
{
z
1
,
…
,
z
n
}, z
i
∈
{
1,2
,
…
,
M
}. M is a finite integer that is needed to be specified in advance. X and Z are combined together to form a complete data set, Y
=
X
,
Z
=
{
(
x
1
,
z
1
)
,
…
,
(
x
n
,
z
n
)
}. The likelihood function of the complete data is as follows:
(4)
L
(
θ
∣
X
,
Z
)
=
P
(
X
,
Z
∣
θ
)
=
∏
i
=
1
n
P
(
x
i
,
z
i
∣
θ
)
.The expected value of the likelihood function is as follows:(5)
E
L
(
θ
∣
X
,
Z
)
=
∫
p
(
X
,
Z
∣
θ
)
f
(
Z
)
d
z
.Each round iteration of EM algorithm consists of two steps: E-step and M-step. Each operation will produce a new value ofθ parameter, but we have to give its initial value. Assuming that the initial value of θ parameter is θ
0, the two steps are as follows.E-Step. Define an auxiliary function, Q
(
θ
,
θ
(
i
-
1
)
):
(6)
Q
θ
,
θ
i
-
1
=
E
log
⁡
⁡
L
(
θ
∣
X
,
Z
)
=
∫
log
⁡
⁡
L
(
θ
∣
X
,
Z
)
f
(
Z
∣
θ
i
-
1
)
d
z
.In the above function,Q
(
θ
,
θ
(
i
-
1
)
) is the function of θ parameter; θ
i
-
1 is the value of θ from the last iteration. The value of Q
(
θ
,
θ
(
i
-
1
)
) is the expected value of log
⁡
⁡
L
(
θ
∣
X
,
Z
).M-Step. Calculate the value of θ
*, and Q
(
θ
*
,
θ
(
i
-
1
)
) is the great value:
(7)
θ
*
=
θ
i
=
arg
⁡
max
⁡
⁡
Q
(
θ
,
θ
(
i
-
1
)
)
.It can be seen that the distribution of random vectorZ is determined by X and θ
(
i
-
1
). If θ
i
* represents the maximum likelihood function value of the i iteration and θ
i
-
1
* represents the maximum likelihood function value of the i
-
1 iteration, it can be proved that EM algorithm can guarantee that θ
i
*
≥
θ
i
-
1
*, and EM algorithm is convergent.


### 3.3. Gaussian Mixture Model Based on EM Algorithm

In a GMM, we assume thatX is generated by a GMM with K components, and X
=
{
x
1
,
…
,
x
i
,
…
,
x
n
}. The complete data is Y
=
X
,
Z
=
{
(
x
1
,
z
1
)
,
…
,
(
x
n
,
z
n
)
}. Z is the implicit category of the data. z
i represents the cluster of x
i, and z
i
=
(
z
i
1
,
…
,
z
i
K
):
(8)
z
i
k
=
1
if
x
i
belongs
to
group
k
0
otherwise
.Assuming that there areK clusters and the weight of the k component in the GMM is π
k, θ
k is the corresponding parameter. The density of z
i based on x
i is as follows:
(9)
∏
k
=
1
K
f
k
(
x
i
∣
θ
k
)
z
i
kThe logarithmic likelihood function of the complete data is(10)
L
(
θ
k
,
π
k
,
z
i
k
∣
x
)
=
∑
i
=
1
n
∑
k
=
1
K
z
i
k
[
log
⁡
⁡
π
k
f
k
(
x
i
∣
θ
k
)
]
.Here, it is difficult to calculate the maximum value with the method of solving equations directly, so we will use EM algorithm to solve problem. In E-step of EM algorithm, the conditional expectation of the logarithmic likelihood function of complete data can be calculated with observable variablesX and the estimated value of current parameter; in M-step, the weight, mean, and covariance matrix, which meet the log-likelihood function value which is the greatest, will be calculated with the results from E-step.The parameter estimation of GMM based on EM algorithm is as follows.Initialize weight, mean, and covariance matrix.Repeat.E-Step.
z
i
k is calculated:
(11)
z
i
k
=
(
π
k
f
k
(
x
i
∣
μ
k
,
ε
k
)
)
(
∑
j
=
1
G
π
j
f
j
(
x
i
∣
μ
j
,
ε
j
)
)
.
M-Step.
Calculate the estimated value of the maximum likelihood parameter withz
i
k from E-step:
(12)
n
k
=
∑
i
=
1
n
z
i
k
,
π
k
=
n
k
n
,
μ
k
=
∑
i
=
1
n
z
i
k
x
i
n
k
,
ε
k
=
∑
i
=
1
n
z
i
k
x
i
-
μ
k
x
i
-
μ
k
′
n
kuntil reaching the satisfactory convergence criteria.


## 3.1. Gaussian Mixture Model

Gaussian mixture model (GMM) is commonly used for clustering. Each GMM consists of several Gaussian distributions, and each of them is called a component, which represents a different cluster. All the components are linearly added together to form a probability density function (PDF) of GMM.There is a set of observed data, which isX
=
{
x
1
,
…
,
x
i
,
…
,
x
n
}. Each vector x
i is a p-dimensional vector. We assume that X is generated by a GMM with K components. The function f
k
(
x
i
) represents the probability density function of the k component, expressing the probability of x
i generated by the k component. So, the PDF of the GMM is as follows:
(1)
P
x
i
=
∑
k
=
1
K
π
k
f
k
(
x
i
∣
μ
k
,
ε
k
)
.In the above formula,π
k represents the weight of the k component in the GMM; μ
k and ε
k represent the mean vector and covariance matrix of the k component; P
x
i represents the probability of x
i generated by the GMM. Moreover, π
k satisfies the following conditions:
(2)
π
k
≥
0
,
∑
k
=
1
G
π
k
=
1
.The PDF of thek component f
k
(
x
i
∣
μ
k
,
ε
k
) is expressed as follows:
(3)
f
k
(
x
i
∣
μ
k
,
ε
k
)
=
exp
⁡
⁡
-
1
/
2
(
x
i
-
μ
k
)
T
∑
k
-
1
(
x
i
-
μ
k
)
(
2
π
)
p
/
2
ε
k
1
/
2
.


## 3.2. Expectation-Maximization Algorithm

Expectation-maximization algorithm (EM algorithm), formally proposed by Dempster, Laird, and Rubin in 1977, is an effective method to deal with incomplete data. EM algorithm is also a maximum likelihood estimation algorithm to solve model parameters from incomplete data. EM algorithm, with good local convergence, is simple and stable.The basic principle of EM algorithm can be expressed as follows:X is the data that we can observe, but it is incomplete.The complete data isY
=
(
X
,
Z
), and Z is the missing data. If θ is used to represent model parameter, P
(
θ
∣
X
) is the posterior distribution of θ with X. However, P
(
θ
∣
X
) is too complex to perform various statistical calculations. Assuming that the missing data Z is known, we can get a posterior distribution of θ, P
(
θ
∣
X
), which is relatively simple so that we can perform a variety of statistical calculations. Looking back, the assumption about the value of Z can be checked and improved. Following this cycle, we will convert a complex maximization problem to a series of simple maximization problems.There is a set of observed dataX
=
{
x
1
,
…
,
x
i
,
…
,
x
n
}, and data is independent from each other. The implicit category of the data, Z, is introduced, and Z
=
{
z
1
,
…
,
z
n
}, z
i
∈
{
1,2
,
…
,
M
}. M is a finite integer that is needed to be specified in advance. X and Z are combined together to form a complete data set, Y
=
X
,
Z
=
{
(
x
1
,
z
1
)
,
…
,
(
x
n
,
z
n
)
}. The likelihood function of the complete data is as follows:
(4)
L
(
θ
∣
X
,
Z
)
=
P
(
X
,
Z
∣
θ
)
=
∏
i
=
1
n
P
(
x
i
,
z
i
∣
θ
)
.The expected value of the likelihood function is as follows:(5)
E
L
(
θ
∣
X
,
Z
)
=
∫
p
(
X
,
Z
∣
θ
)
f
(
Z
)
d
z
.Each round iteration of EM algorithm consists of two steps: E-step and M-step. Each operation will produce a new value ofθ parameter, but we have to give its initial value. Assuming that the initial value of θ parameter is θ
0, the two steps are as follows.E-Step. Define an auxiliary function, Q
(
θ
,
θ
(
i
-
1
)
):
(6)
Q
θ
,
θ
i
-
1
=
E
log
⁡
⁡
L
(
θ
∣
X
,
Z
)
=
∫
log
⁡
⁡
L
(
θ
∣
X
,
Z
)
f
(
Z
∣
θ
i
-
1
)
d
z
.In the above function,Q
(
θ
,
θ
(
i
-
1
)
) is the function of θ parameter; θ
i
-
1 is the value of θ from the last iteration. The value of Q
(
θ
,
θ
(
i
-
1
)
) is the expected value of log
⁡
⁡
L
(
θ
∣
X
,
Z
).M-Step. Calculate the value of θ
*, and Q
(
θ
*
,
θ
(
i
-
1
)
) is the great value:
(7)
θ
*
=
θ
i
=
arg
⁡
max
⁡
⁡
Q
(
θ
,
θ
(
i
-
1
)
)
.It can be seen that the distribution of random vectorZ is determined by X and θ
(
i
-
1
). If θ
i
* represents the maximum likelihood function value of the i iteration and θ
i
-
1
* represents the maximum likelihood function value of the i
-
1 iteration, it can be proved that EM algorithm can guarantee that θ
i
*
≥
θ
i
-
1
*, and EM algorithm is convergent.


## 3.3. Gaussian Mixture Model Based on EM Algorithm

In a GMM, we assume thatX is generated by a GMM with K components, and X
=
{
x
1
,
…
,
x
i
,
…
,
x
n
}. The complete data is Y
=
X
,
Z
=
{
(
x
1
,
z
1
)
,
…
,
(
x
n
,
z
n
)
}. Z is the implicit category of the data. z
i represents the cluster of x
i, and z
i
=
(
z
i
1
,
…
,
z
i
K
):
(8)
z
i
k
=
1
if
x
i
belongs
to
group
k
0
otherwise
.Assuming that there areK clusters and the weight of the k component in the GMM is π
k, θ
k is the corresponding parameter. The density of z
i based on x
i is as follows:
(9)
∏
k
=
1
K
f
k
(
x
i
∣
θ
k
)
z
i
kThe logarithmic likelihood function of the complete data is(10)
L
(
θ
k
,
π
k
,
z
i
k
∣
x
)
=
∑
i
=
1
n
∑
k
=
1
K
z
i
k
[
log
⁡
⁡
π
k
f
k
(
x
i
∣
θ
k
)
]
.Here, it is difficult to calculate the maximum value with the method of solving equations directly, so we will use EM algorithm to solve problem. In E-step of EM algorithm, the conditional expectation of the logarithmic likelihood function of complete data can be calculated with observable variablesX and the estimated value of current parameter; in M-step, the weight, mean, and covariance matrix, which meet the log-likelihood function value which is the greatest, will be calculated with the results from E-step.The parameter estimation of GMM based on EM algorithm is as follows.Initialize weight, mean, and covariance matrix.Repeat.E-Step.
z
i
k is calculated:
(11)
z
i
k
=
(
π
k
f
k
(
x
i
∣
μ
k
,
ε
k
)
)
(
∑
j
=
1
G
π
j
f
j
(
x
i
∣
μ
j
,
ε
j
)
)
.
M-Step.
Calculate the estimated value of the maximum likelihood parameter withz
i
k from E-step:
(12)
n
k
=
∑
i
=
1
n
z
i
k
,
π
k
=
n
k
n
,
μ
k
=
∑
i
=
1
n
z
i
k
x
i
n
k
,
ε
k
=
∑
i
=
1
n
z
i
k
x
i
-
μ
k
x
i
-
μ
k
′
n
kuntil reaching the satisfactory convergence criteria.


## 4. Problem Definition

Nowadays, the Internet of Things is widely used in a variety of fields, such as intelligent transportation, smart buildings, healthcare field, positioning and navigation field, and logistics field. The IoT is usually divided into three layers, from bottom to top, which are perception layer, transport layer, and application layer. Among them, the perception layer is responsible for data collection. There are wireless sensor nodes, weird sensor nodes, and other hardware at the perception layer, which are integrated with the sensor module so that they can collect environmental data. Among these data collecting equipment, some nodes only integrate a kind of sensor module, such as temperature sensor module, and this type of sensor nodes can only collect a kind of environmental data, such as temperature. However, some nodes integrate multiple sensor modules, such as temperature module, humidity module, light module, and acceleration module. These sensor nodes can acquire diverse environmental data, such as temperature, humidity, light, and acceleration.Data collected in the IoT are usually time-series data. A data collected at a time is called an instance, which generally contains multiple attributes: time, node number, sequence number, temperature, humidity, light, voltage, and acceleration. This phenomenon of data missing is very common in the IoT for various reasons, such as unstable network communication, synchronization issues, unreliable sensors, and other types of equipment failure. It results in people not being able to use the experimental data normally. As a result, the accuracy and reliability of the experimental results will be greatly reduced. So, we will have to estimate missing values. First of all, some definitions will be given as follows.Definition 1.
Data collected at a time in the Internet of Things is called an instance.Definition 2.
Data set consists of multiple instances.Definition 3.
An instance consists of basic attributes and observation attributes. Time, node number, and sequence number belong to basic attributes; temperature, humidity, light, voltage, and acceleration belong to observation attributes.
In the next section,D is used to represent a data set; X represents an instance, while x represents an attribute. The relationship between these variables is as follows:
(13)
D
=
[
X
1
,
…
,
X
i
,
…
,
X
m
]
T
,
X
i
=
x
i
1
,
…
,
x
i
j
,
…
,
x
i
n
,
1
≤
i
≤
m
,
1
≤
j
≤
n
.
The basic attributes uniquely identify an instance. And we determine whether the data is missing through its basic attributes. We determine the basic attributes of an instance with the following methods: time can be obtained with historical time and data collecting frequency; node number and sequence number can be acquired with historical sequence number of nodes. Therefore, this paper addresses missing value imputation about observation attributes. In the next section,x
i
j represents observation attributes; x
i
j
^ represents the estimated value of missing data.Definition 4.
∀
X
i
∈
D, ∀
x
i
j
∈
X
i, if x
i
j is missing, the problem of solving the estimated value of x
i
j and making x
i
j
^
-
x
i
j the minimum value is called missing data imputation problem.Definition 5.
∀
X
i
∈
D, ∀
x
i
j
∈
X
i, X
i has only one observation attribute. If x
i
j is missing and ∃
(
x
i
-
1
j
,
x
i
+
1
j
), x
i
-
1
j and x
i
+
1
j are not missing, the problem of solving the estimated value of x
i
j and making x
i
j
^
-
x
i
j the minimum value is called the first class of problem of missing data imputation.Definition 6.
∀
X
i
∈
D, ∀
x
i
j
∈
X
i, X
i has only one observation attribute. If x
i
j is missing and ∃
x
i
-
1
j, x
i
-
1
j is missing (or ∃
x
i
+
1
j, x
i
+
1
j is missing), the problem of solving the estimated value of x
i
j and making x
i
j
^
-
x
i
j the minimum value is called the second class of problem of missing data imputation.Definition 7.
∀
X
i
∈
D, ∀
x
i
j
∈
X
i, X
i has two or more observation attributes. If x
i
j is missing, the problem of solving the estimated value of x
i
j and making x
i
j
^
-
x
i
j the minimum value is called the third class of problem of missing data imputation.


## 5. Missing Value Imputation Model Based on GMM for the IoT

### 5.1. Model of Data Missing

In Section4, the problems of missing value imputation for the IoT are divided into three categories. Next, the three corresponding models of data missing will be given.Definition 8.
∀
X
i
∈
D, ∀
x
i
j
∈
X
i,
(14)
x
i
j
=
1
if
x
i
j
is
not
missing
0
if
x
i
j
is
missing
.
The model of data missing, corresponding to the first class of problem of missing data imputation, is shown below:(15)
D
=
[
1,0
,
11,0
,
1,1
,
1
,
…
,
1,1
,
0,1
]
T
.
In the first class of data missing model, each instance has only one observation attribute. The values of observation attribute are missing at random, but the situation of data missing continuously does not exist.
The model of data missing, corresponding to the second class of problem of missing data imputation, is shown as follows:(16)
D
=
[
1,0
,
0,0
,
0,0
,
1,1
,
…
,
1,0
,
0,1
]
T
.
In the second class of data missing model, each instance has only one observation attribute. The values of observation attribute are missing at random. If data miss, data will miss continuously in a certain period of time.
The model of data missing, corresponding to the third class of problem of missing data imputation, is shown below:(17)
D
=
1
1
1
0
0
0
1
0
0
⋯
1
0
1
⋮
⋱
⋮
1
1
1
1
0
1
1
1
0
⋯
1
0
1
.
In the third class of data missing model, each instance has two or more observation attributes. The values of an instance may all be missing or partially missing; the values of an attribute may be missing continuously or intermittently.


### 5.2. Missing Value Imputation Model Based on GMM for the IoT

Data collected in the IoT are usually time-series data, which are generated by kinds of nodes at different locations and different regions. These data has strong spatial-temporal correlation, attribute correlation, instance correlation, and nodes correlation, though the correlation is strong or weak.According to the strong spatial-temporal correlation and other types of potential relevance, we build three models of missing value imputation, for three models of data missing, to solve the above three types of problems.The model of missing value imputation based on context and linear mean (MCL) is as follows.Model  1. ∀
X
i
∈
D, ∃
x
i
j
∈
X
i, if x
i
j is missing, ∃
x
i
-
1
j
∈
X
(
i
-
1
), ∃
x
i
+
1
j
∈
X
(
i
+
1
), but x
i
-
1
j and x
i
+
1
j are not missing; then,
(18)
x
i
j
=
1
2
x
i
-
1
j
+
x
i
+
1
j
.In the first model of data missing, each instance has only one observation attribute, sox
i
j
=
x
i.The model of missing value imputation based on binary search (MBS) is as follows.Model  2. ∀
X
i
∈
D, ∃
x
h
j
∈
X
h, ∃
x
t
j
∈
X
t, if x
h
j and x
t
j are not missing, ∃
x
i
j
∈
X
i, x
i
j is missing, and t
<
i
<
h, i
=
1
/
2
(
h
+
t
), then,
(19)
x
i
j
=
1
2
x
t
j
+
x
h
j
.Model  3. The detailed process of missing value imputation model based on GMM for the IoT (MGI) is as follows.Step 1.
Data setD is divided into two data sets: D
y and D
n. D
y is a complete data set, which contains all instances without missing values; But D
n is an incomplete data set, which contains all instances with missing values.
Data partitioning rule is as follows.∀
X
i
∈
D, ∃
x
i
j
∈
X
i, if x
i
j is missing, then X
i
∈
D
n; else X
i
∈
D
y.Step 2.
Cluster the complete dataD
y with the GMM model based on EM algorithm, and find cluster center of each cluster. Then, determine the cluster of each instance from D
y.Step 3.
The incomplete dataD
n are classified according to the result of clustering. Then, determine the cluster of each instance from D
n.
Classification rules are as follows.∀
X
i
∈
D
n, X
i belongs to a cluster, whose cluster center is the closest to X
i by the Euclidean distance.Step 4.
∀
X
i
∈
D
n, find one or more complete instances, which is the closest to X
i, in the cluster of X
i by the Euclidean distance.Step 5.
∀
X
i
∈
D
n, determine the value of X
i with the mean value of complete instances from Step 4.The flow diagram of the MGI model is shown in Figure1.Figure 1
Flow diagram of the MGI model.


## 5.1. Model of Data Missing

In Section4, the problems of missing value imputation for the IoT are divided into three categories. Next, the three corresponding models of data missing will be given.Definition 8.
∀
X
i
∈
D, ∀
x
i
j
∈
X
i,
(14)
x
i
j
=
1
if
x
i
j
is
not
missing
0
if
x
i
j
is
missing
.
The model of data missing, corresponding to the first class of problem of missing data imputation, is shown below:(15)
D
=
[
1,0
,
11,0
,
1,1
,
1
,
…
,
1,1
,
0,1
]
T
.
In the first class of data missing model, each instance has only one observation attribute. The values of observation attribute are missing at random, but the situation of data missing continuously does not exist.
The model of data missing, corresponding to the second class of problem of missing data imputation, is shown as follows:(16)
D
=
[
1,0
,
0,0
,
0,0
,
1,1
,
…
,
1,0
,
0,1
]
T
.
In the second class of data missing model, each instance has only one observation attribute. The values of observation attribute are missing at random. If data miss, data will miss continuously in a certain period of time.
The model of data missing, corresponding to the third class of problem of missing data imputation, is shown below:(17)
D
=
1
1
1
0
0
0
1
0
0
⋯
1
0
1
⋮
⋱
⋮
1
1
1
1
0
1
1
1
0
⋯
1
0
1
.
In the third class of data missing model, each instance has two or more observation attributes. The values of an instance may all be missing or partially missing; the values of an attribute may be missing continuously or intermittently.


## 5.2. Missing Value Imputation Model Based on GMM for the IoT

Data collected in the IoT are usually time-series data, which are generated by kinds of nodes at different locations and different regions. These data has strong spatial-temporal correlation, attribute correlation, instance correlation, and nodes correlation, though the correlation is strong or weak.According to the strong spatial-temporal correlation and other types of potential relevance, we build three models of missing value imputation, for three models of data missing, to solve the above three types of problems.The model of missing value imputation based on context and linear mean (MCL) is as follows.Model  1. ∀
X
i
∈
D, ∃
x
i
j
∈
X
i, if x
i
j is missing, ∃
x
i
-
1
j
∈
X
(
i
-
1
), ∃
x
i
+
1
j
∈
X
(
i
+
1
), but x
i
-
1
j and x
i
+
1
j are not missing; then,
(18)
x
i
j
=
1
2
x
i
-
1
j
+
x
i
+
1
j
.In the first model of data missing, each instance has only one observation attribute, sox
i
j
=
x
i.The model of missing value imputation based on binary search (MBS) is as follows.Model  2. ∀
X
i
∈
D, ∃
x
h
j
∈
X
h, ∃
x
t
j
∈
X
t, if x
h
j and x
t
j are not missing, ∃
x
i
j
∈
X
i, x
i
j is missing, and t
<
i
<
h, i
=
1
/
2
(
h
+
t
), then,
(19)
x
i
j
=
1
2
x
t
j
+
x
h
j
.Model  3. The detailed process of missing value imputation model based on GMM for the IoT (MGI) is as follows.Step 1.
Data setD is divided into two data sets: D
y and D
n. D
y is a complete data set, which contains all instances without missing values; But D
n is an incomplete data set, which contains all instances with missing values.
Data partitioning rule is as follows.∀
X
i
∈
D, ∃
x
i
j
∈
X
i, if x
i
j is missing, then X
i
∈
D
n; else X
i
∈
D
y.Step 2.
Cluster the complete dataD
y with the GMM model based on EM algorithm, and find cluster center of each cluster. Then, determine the cluster of each instance from D
y.Step 3.
The incomplete dataD
n are classified according to the result of clustering. Then, determine the cluster of each instance from D
n.
Classification rules are as follows.∀
X
i
∈
D
n, X
i belongs to a cluster, whose cluster center is the closest to X
i by the Euclidean distance.Step 4.
∀
X
i
∈
D
n, find one or more complete instances, which is the closest to X
i, in the cluster of X
i by the Euclidean distance.Step 5.
∀
X
i
∈
D
n, determine the value of X
i with the mean value of complete instances from Step 4.The flow diagram of the MGI model is shown in Figure1.Figure 1
Flow diagram of the MGI model.


## 6. Experiment

### 6.1. Experimental Data and Settings

The programming software and data statistical analysis tool of this paper are Matlab (Release 2012a) and SPSS 20. Experimental data are collected from 54 sensors deployed in the Intel Berkeley Research lab between February 28 and April 5, 2004, [18]. The attributes of the data from the IoT includes time, node number, sequence number, temperature, humidity, light, and voltage. The sampling frequency of the sensor nodes is 2 times per minute. This paper, for three different data missing models, set three corresponding experiments.


### 6.2. Experiment of MCL Model

This experimental sample data includes 220 instances, which only contain temperature attribute. In the 220 instances, the temperature values of 20 instances miss at random, and this data missing situation is consistent with the first type of data missing model. This experiment adopts the MCL model to solve the first type of missing value imputation problems.The results of this experiment are shown in Figures2 and 3.Figure 2
Experiment results of MCL model.Figure 3
Error analysis of MCL model.


### 6.3. Experiment of MBS Model

In this experiment, sample data contain 220 instances, only including temperature attribute. In the 220 instances, the temperature values of 21 instances miss at random, and this data missing situation is consistent with the second type of data missing model. This experiment adopts the MBS model to solve the second type of missing value imputation problems.The experimental results are shown in Figures4 and 5.Figure 4
Experiment results of MBS model.Figure 5
Error analysis of MBS model.


### 6.4. Experiment of MGI Model

This experimental sample data of MGI includes 220 instances, which contain temperature attribute and humidity attribute. In the 220 instances, the values of 20 instances miss at random, and this data missing situation is consistent with the third type of data missing model. This experiment adopts the MGI model to solve the third type of missing value imputation problems.The experimental results are shown in Figures6, 7, and 8.Figure 6
Clustering results.Figure 7
Experiment results of MGI model.Figure 8
Error analysis of MGI model.


### 6.5. Analysis and Evaluation of Experimental Results

Through the above experiments for the tree types of data missing, it can be seen that the three models of missing values imputation can estimate the missing values effectively. According to the experimental results and error analysis, we can see that MCL model, MBS model, and MGI model are stable and reliable. And the estimate values from the three models have high accuracy and small error.


## 6.1. Experimental Data and Settings

The programming software and data statistical analysis tool of this paper are Matlab (Release 2012a) and SPSS 20. Experimental data are collected from 54 sensors deployed in the Intel Berkeley Research lab between February 28 and April 5, 2004, [18]. The attributes of the data from the IoT includes time, node number, sequence number, temperature, humidity, light, and voltage. The sampling frequency of the sensor nodes is 2 times per minute. This paper, for three different data missing models, set three corresponding experiments.


## 6.2. Experiment of MCL Model

This experimental sample data includes 220 instances, which only contain temperature attribute. In the 220 instances, the temperature values of 20 instances miss at random, and this data missing situation is consistent with the first type of data missing model. This experiment adopts the MCL model to solve the first type of missing value imputation problems.The results of this experiment are shown in Figures2 and 3.Figure 2
Experiment results of MCL model.Figure 3
Error analysis of MCL model.


## 6.3. Experiment of MBS Model

In this experiment, sample data contain 220 instances, only including temperature attribute. In the 220 instances, the temperature values of 21 instances miss at random, and this data missing situation is consistent with the second type of data missing model. This experiment adopts the MBS model to solve the second type of missing value imputation problems.The experimental results are shown in Figures4 and 5.Figure 4
Experiment results of MBS model.Figure 5
Error analysis of MBS model.


## 6.4. Experiment of MGI Model

This experimental sample data of MGI includes 220 instances, which contain temperature attribute and humidity attribute. In the 220 instances, the values of 20 instances miss at random, and this data missing situation is consistent with the third type of data missing model. This experiment adopts the MGI model to solve the third type of missing value imputation problems.The experimental results are shown in Figures6, 7, and 8.Figure 6
Clustering results.Figure 7
Experiment results of MGI model.Figure 8
Error analysis of MGI model.


## 6.5. Analysis and Evaluation of Experimental Results

Through the above experiments for the tree types of data missing, it can be seen that the three models of missing values imputation can estimate the missing values effectively. According to the experimental results and error analysis, we can see that MCL model, MBS model, and MGI model are stable and reliable. And the estimate values from the three models have high accuracy and small error.


## 7. Conclusions

This paper, for the characteristics of the data itself and the features of missing data in the Internet of Things, divides the missing value into three types and defines three corresponding missing value imputation problems. Then, we propose three new models, which are MCL model, MBS model, and MGI model, to solve the corresponding problems. Experimental results showed that the three models can improve the accuracy, reliability, and stability of missing value imputation greatly and effectively.



---

*Source: 548605-2015-03-02.xml*