Step2: Detecting Variation
Algorithm 1: Algorithm LR Input: Thresholds: α, β and T
4.2 Algorithm KR: Modeling Interested Attributes
4.2.1 Kernel Regression
Let the collected data points for an interested attribute from a mobile sensor be Ψ and each data point in S can be represented as (Xi, Ii) where a feature points Xi = (Xi,1, Xi,2, ...Xi,d) is a point with d attributes with an interested value Ii. For example, the speed of a mobile sensor is related to its location and the time. Thus, the feature point Xi = (xi, yi, ti) where this mobile sensor is in (xi, yi) at time ti and the interested value Ii denotes the corresponding speed.
Given Ψ from a mobile sensor, the idea of kernel regression is to estimate the in-terested value at x according to that at nearby feature points in Ψ. Conceptually, for each feature point Xi, since a mobile sensor ”observed” that the corresponding inter-ested value to be Ii, we have the most ”confidence” to estimate the interested value at Xi (i.e., Ii). When a point is far from a feature point Xi, we have fewer ”confidence”
to estimate the interested value at this point by that of Xi. That is, the interested values with most information about Ii should be those at points closet to Xi, and vice versa.
Therefore, based on this concept, when given an arbitrary point x, we can estimate its interested value by evaluating amount of information which x contains about each
ob-served feature points.
Formally, suppose that there are n data points{(X1, I1), ..., (Xn, In)}. the interested value at an arbitrary point x is estimated by
ˆI = n
j=1Yj × Kα(x, Xj)
n
j=1Kα(x, Xj) (4.1)
, where Kα(x, Xj) is the kernel with its kernel radius α.
In kernel regression, the kernel Kα(x, Xi) is responsible to evaluate how much infor-mation x contains about the interested values Ii, i.e., weight x, according to the distance between x and Xi. The kernel radius α is represented as the width of a window center at the Xi and give weighing value to x if it locates in the window. With the increasing of distance from x to Xi, the value of Kα(x, Xi) keeps decreasing in a window decided by α. For example, suppose that x and Xi are in one dimension. The Gaussian kernel is formulated as Kα(x, Xi) = e−(x−Xi)22α2 . Let α be 3 and Xi be 16. It can be verified that when x = 10, K3(10, 16) = e−(10−16)22×0.52 = 0.135. When x = 0.9 which is more closer to 1 than previous one, we can obtain a larger K3(14.16) = e−(14−16)22×0.52 = 0.801.
The weighting behavior of Gaussian kernel with α= 3 is illustrated in Figure 4.3. Once given several data points, we can estimate the interested values at every feature point by their kernels. Suppose that there are three feature points X1 = 16, X2 = 20 and X3 = 8.
The bold line shows the weighting effect by the kernels of X1, X2 and X3in Figure 4.4.
Usually, a kernel is designed for weighting a one-dimensional point. However, we can extend a kernel for a multiple dimension data point. Specifically, given a feature point Xi = (Xi,1, Xi,2, ...Xi,d) with its interested value Ii, we can derive a Gaussian kernel for a multiple dimension data point x = (x1, ...xd) as Kα(x, Xi) = d
j=1e−(xj−Xi,j)22α2
(18). For example, let α = 3 and Xi = (16, 16). Given x = (10, 14), we can obtain K3(x, Xi) = e−(10−16)22×0.52 × e−(14−16)22×0.52 = 0.108.
Although there have been several kernels proposed, it is worth mentioning that the accuracy of kernel regression is highly dependent on the selection of radius instead of
0
Figure 4.3: Example of the kernel regression the selection of the kernel(19)(18).
0
Figure 4.4: Example of the kernel regression
4.2.2 Algorithm KR
Kernel regression can be used to model data points with unknown underlying distribu-tion. Note that the accuracy of the curve build by kernel regression is dependent on both the number of data points involving in building the model and the selected kernel radius. For preserving the bandwidth, several data points are sampled from the set of collected data points Ψ and uploaded to the server. Through selecting a proper kernel radius, the server can use kernel regression to build a curve by fewer data points and the QoS specification can be satisfied.
To achieve this goal, we are starting with sampling a certain number of data points
ı
Figure 4.5: Effect of kernel radius on the RMSE
according to an initial sampling rate rateinit. Given these sampled data points, we can apply rule-of-thumb(ROT) method to selection the initial kernel radius of each dimen-sion (18). Base on the ROT, the bandwidth ˆα for the kernel function Ki could be com-puted using the following equation:
ˆ
where each feature point is d-dimensional and σiis the standard deviation of the sampled data points in the i-th dimension. From Figure 4.5, we can see that the RMSE under the kernel radius chosen by ROT method, which is about 9.52, can be improved to the local minimal RMSE which is 7.9. For preserving the bandwidth, we first use (1+1)-ES, an efficient local search method, for searching a kernel radius which can reduce RMSE to local minimum under the same number of sampled points. According to these sampled data points and the derived kernel radius, we can exploit kernel regression to generate a curve fitted them. To guarantee this curve can represent all data points in Ψ, we shall examine RMSE between the curve and data points in Ψ. Once satisfying the QoS specification, we can upload the sampled data points to the server such that the same curve can be derived by them in the server side. Otherwise, the sampling rate will increase and more data points will be sampled to involve the computation of kernel
regression. At last, if the sampling rate is higher than ratemax and the derived curve still cannot achieve QoS specification, a mobile sensor will upload all data points inΨ to the server. To realize this concept, we proposed Algorithm KR listed in Algorithm 2.
Algorithm 2: Algorithm KR
α← kernel radius by ROT according to Ψ;
6
α← apply α to (1+1)-ES for g generations;
7
C ← the curve derived by kernel regression with α, S;
8 and speed as our example. Suppose that the QoS specification I is 2.5, ratemin is 40%
and rateincis 20%. Initially, we sample5 × 40% = 2 points which are d1and d4. Figure 4.6(a) shows the results by two kernels centered at d1 and d4. Since the RMSE of this curve is 2.71 which is larger than I, then the sampling rate is increasing to 40% + 20% = 60% such that we sample5 × 60% = 3 points, d1, d2 and d4, to apply kernel regression.
It can be verified that the RMSE of the derived curve being 2.41 does not exceed I and thus these three points are uploaded to the server.
From another view, this example also shows the ability of kernel regression to deal with intermittent connectivity. Suppose that the data points we intend to upload are d1, d2 and d4. When the server only receive two data points d1 and d4, the server can first derived a rough view in time about the whole data points as shown in Figure 4.6(a).
While receiving more and more data points, the curve built by the server will be refined to
the one shown in 4.6(b), and much fits the data points. As such, this born feature of kernel regression can benefits many real-time applications, for example, traffic monitoring.
ıįıı
Figure 4.6: The kernel regression model based on Epanechnikov kernels by (a) two and (b) three data points
Chapter 5
In-network Aggregation Mechanism
In this section, we introduce an in-network aggregation mechanism allowing mobile sensors with similar data to aggregate their models. Obviously, in-network aggregation between mobile sensors can reduce the amount of data needed to be uploaded so that the bandwidth of the server and the network can be saved.
However, there are several issues to be addressed. First, grouping mobile sensors into clusters and selecting a cluster head for aggregation, the state-of-the-art approach used in a static sensor network, may not be applicable in a mobile sensor network. In a mobile sensor networks, the connectivity between mobile sensors are usually highly dynamic and may vary drastically due to the unpredictable mobility of mobile sensors.
Therefore, the proposed in-network aggregation mechanism is required not to maintain extra information to organize cluster between mobile sensors. Second, due to the deploy-ment of access points, mobile sensors may have different probabilities to connect access points. For example, a mobile sensor often moving in an urban area usually has higher probability than that in a countryside area since the density of access points deployed in an urban area is more higher than that in a countryside area. Therefore, the proposed in-network aggregation mechanism should be aware of the probability of connecting to access points such that the aggregated data can be sent to the server more quickly.
To tackle the issues above, we proposed a random-coupling approach for in-network
aggregation. Our approach is composed into three phases, randomly coupling, aggrega-tor selection and aggregation. The details of each phase are described as follows: