Identifying correctness data scheme for aggregating data in cluster heads of wireless sensor network based on naive Bayes classification

Wireless sensor network (WSN) has been paid more attention by scholars due to the practical communication of a system of devices to transfer information gathered from a monitored field through wireless links. Precise and accurate data of aggregating messages from sensor nodes is a vital demand for a success WSN application. This paper proposes a new scheme of identifying the correctness data scheme for aggregating data in cluster heads in hierarchical WSN based on naive Bayes classification. The collecting environmental information includes temperature, humidity, sound, and pollution levels, from sensor nodes to cluster heads that classify data fault and aggregate and transfer them to the base station. The collecting data is classified based on the classifier to aggregate in the cluster head of WSN. Compared with some existing methods, the proposed method offers an effective way of forwarding the correct data in WSN applications.


Introduction
Wireless sensor network (WSN) refers to a set of spatially dispersed and dedicated sensors for recording and monitoring the physical conditions and organizing the data collected at a central location [1,2].WSNs are a low-cost network that is widely used in numerous applications [3][4][5].The needed environmental information like temperature, light, sound, humidity, wind, air, and water pollution levels could be captured and measured by sensor nodes of WSN [6][7][8][9].A good designed and employed WSN often follows the clustering fashion as efficient ways of saving energy networks that is to generate clusters by arranging the sensor nodes into groups [10].The power consumption of WSNs is affected directly by the clustering criterion problem [11].The cluster composes node members (NM) and cluster head (CH).CH is selected from among NM.The functions of CHs are not only to collect the information from the NM but also to aggregate captured data that forwarded to the BS [12,13].Figure 1 shows an example of the clustering fashion of WSN.
Clustering provides various advantages like energy efficiency, prolonging lifetime, scalability, and less delay.However, the clustered WSNs also have got the drawback such as the aggregated data fault problem at CHs that caused the network reliability of the monitoring and predicting applications decreased [10,14].
This paper considers the correct data to transfer from CHs to the base station (BS) of WSN.The decision function of the classifier is deployed in the CH for aggregating accuracy data.The cluster heads (CHs) in hierarchical WSN aggregate the captured data by MNs, then CHs send them to the BS or via hops (via other CHs).The method of classification is used to detect the faults based on the data learning model in making decisions by combining expert knowledge and statistical learning method.The accuracy of captured data has an essential role in successful ones for several applications such as weather prediction, military monitoring, traffic monitoring, seismic activity prediction, and healthcare monitoring [6,15,16].
The faults of WSN occur commonly due to its characteristic that is a network through wireless links of devices on ubiquitous and deployed in uncertain and hazardous areas, e.g., battlefields, forest, healthcare, volcanos, highways.Thus, how to get reliable data to transfer from CH to the BS for further processing will be an urgent requirement to guarantee proper functioning applications [17].The distinction between normal and faulty data must be determined correctly.The detection of fault data also should be rapid and precise.Identifying the data fault which occurs spontaneously is difficult as those faults may cause continuous failures [18].The faults will cause the WSN application to increase data network traffic and wastes battery power [19].Data fault detection is a promising way to enhance bandwidth, integrity, and reliability.The applied classification is one of the favors of solutions for identifying faults in WSN [20].
In this paper, the decision function of the classification technique is deployed in CHs of the hierarchical WSN to classify sensing data from MNs and to detect its faults for the next steps of processing, e.g., aggregating data.The CHs should aggregate data of the sensed environmental information from sensor nodes and transfer them to the base station.Naive Bayes classifier is applied to detect data fault in CHs to enhance the integrity and reliability of the WSN application.
The rest of this paper is organized as follows: Section 2 describes the common types of faulty in WSN and related work.Section 3 introduces the proposed method.In Section 4, several experiments are carried on the scenario to evaluate the performance of the proposed method.Finally, the conclusion is discussed in Section 5.

Fault data issues in WSNs
As the WSN is a network through wireless links of devices on ubiquitous that are deployed in uncertain and hazardous areas, e.g., battlefields, forest, healthcare, volcanos, highways [21][22][23].The electronic components in the sensor node are also easy to break down.Some models, such as centralized, distributed, and hybrid fault detection, have been introduced for solving the WSN failures [24].The frequent failures happen of WSNs are classified into some types, such as hardware failure, software failure, and communication failure [25].Figure 2 depicts some types of common faults that occur in WSNs.
Hardware failures occur due to the negligence of sensing capability, power (battery failure) location, and processing units of sensors-for example, the battery failure causes the impairment of sensors; software failures, e.g., the fusion and aggregation that occurs due to problems in sensor programs; and communication failures, e.g., a transceiver that disrupts the sending and receiving data from the sensors.Data faults might occur either separately or simultaneously together and also might happen over a while or instantly.Defects in WSN also can be categorized based on two aspects according to the time of the error and location of the fault.The time span of the failure indicates the duration of the fault.The Fig. 1 A clustering scheme of a wireless sensor network.The clustering in WSN composes Node members (NM) and Cluster head (CH).CH is selected from among NM.The functions of CHs are not only to collect the information from the NM but also to aggregate captured data that forwarded to the BS.Clustering provides various advantages like energy efficiency, prolonging lifetime, scalability, and less delay.However, the clustered WSNs also have got the drawback such as the aggregated data fault problem at CHs that caused the network reliability of the monitoring, and predicting applications decreased.location of the fault suggests the environment where the fault occurs [26].The period the defects can be categorized into persistent faults and transient faults.Persistent errors are permanent faults that can be solved when the system recovery made.Transient faults are temporary faults that occur due to network congestion or climatic condition.The location of responsibility is broadly categorized into data-centric and system-centric.Datacentric failure consists of the offset fault, gain fault, drift fault, data loss fault, hard over fault, spike fault, and fusion fault.System-centric fault includes the calibration fault, battery failure, and hardware failure that can cause the malfunctioning of the entire network.The classification is one of the effective solutions for identifying faults in WSN [26][27][28].

Classification methods
Definition of classification is a method of identifying new data belonging to which of a set of data (subset), based on a training set of data containing observations (or instances) whose category membership is known [29].The most popular methods of classification include supervised learning, unsupervised learning, and semi-supervised learning [30].Supervised learning is a paradigm that is trained on a predefined set of training examples using which the accurate result can be obtained when the new data is given.The paradigm works based on labeled data.Unsupervised learning is a paradigm that gives a bunch of data from which the pattern has to be obtained [31].The method executes based on unlabeled data.Semi-supervised learning is a paradigm that its knowledge uses both labeled and unlabeled data [32].
The different affecting factors of sensing data from various sensor nodes in WSN, such as uncertain and hazardous areas of battlefields, forest, volcanos, or highways, are aggregated to model for classification.There are often two phases in the processing of classification.The aspect of learning data allows combining knowledge expertise with the statistical method.The different attributes affecting valid data in WSNs can be verified based on experiences knowledge of the experts.The applied pattern with the probability in the learning data based on the expertise for decision function is carried out to clarify the new capturing data [33].
Figure 3 shows a classification model from the data in the learning methods.Data is a set of data capture from the sensor nodes, i.e., the attributes of sending raw data (also called examples, instances, or cases) described by k attributes: A 1 , A 2 , …A k .Each attribute is considered as a class that is labeled with a predefined course.The goal is to learn a classification model from the data that can be applied to predict the classes of new data for aggregating and forwarding to the base station of WSN.
The essential contributions introduced recently by the community research engaging in fault detection in WSNs are reviewed in this subsection.A method of dealing with detecting failures in WSNs has been developed based on a probabilistic scheme that knows as naive Bayes classifier [34].This method worked out with sensing data as well as remaining energy in the network.Bayesian classification represented a supervised learning method that provides practical learning algorithms, and prior knowledge and observed data could be combined.It assumes an underlying probabilistic model, and it allows us to capture uncertainty about the model in a Fig. 2 The common faults occur in wireless sensor network principled way by determining the probabilities of the outcomes.It can solve diagnostic and predictive problems.The Bayesian classification [35] provides a useful perspective for understanding and evaluating many learning algorithms.It calculates explicit probabilities for hypothesis, and it is robust to noise in input data.The probability of the hypothesis is formulated as follows.
where h and d are hypothesis and data vectors respectively; P(h) is a probability of hypothesis as prior belief; P(d| h) is a probability of the data if the hypothesis h is true; the marginal probability of data PðdÞ ¼ P h PðdjhÞP ðhÞ is data evidence; and p(h| d) is posterior.
Moreover, the decision tree learning algorithm is a greedy divide-and-conquer algorithm.Fault detection in WSN has introduced through decision trees (DT) [36].Assume attributes are categorical now (continuous traits also can be handled).The tree is constructed in a topdown recursive manner.At the start, all the training examples are at the root.Instances are partitioned recursively based on selected attributes.Attributes are selected based on an impurity function (e.g., information gain).Conditions for stopping partitioning consist of one of the conditions as follows.All attributes for a given node belong to the same class.There are no remaining attributes for further partitioning, i.e., the majority class is the leaf, and there are no examples left.
Additionally, a method of fault detection in WSN based on the support vectors machine (SVM) with the Gaussian kernel is deployed for real-time data classification [26].The SVM is a classifier that is the supervised learning model to identify the optimal boundary separating data of two classes.The Lagrangian coefficients are determined, and support vectors along with decision function are defined that are composed of a data preparation block.
The Gaussian kernel scheme is applied in the SVM to maximize the hyper margin plane allows the SVM to fit the maximum margin in a transformed feature space.The hyper-plane in the middle passes with the optimal condition is as v i (w The primary task of kernel function is to identify the general structure of relations in the dataset.Operating SVM with a kernel trick would convert the linear model into a non-linear model.The model will be saved from the input space to feature space. where σ is the kernel width parameter.The modeled kernel width parameter in data-dependent obeyed the cross-validation technique.The techniques of distributed, centralized machine learning, or hybrid based on neighbors, self-detection have been applied for data fault detection schemes in WSN [24].As the same style of the solution, an approach detection errors in big data sets WSN was developed based on the cloud computing scheme (CLOUD) [37].One of the centralized techniques uses a hidden Markov model (HMM) to identify offset fault, gain fault, and struck at fault [38].A method of minimum redundancy maximum relevance (MRMR) proposed to find a subset of features that are used for fault prediction for feature selection [39].MRMR reduces redundancy in features and selects the relevant features.The maximum relevance feature is found by calculating mutual information difference, and the minimum redundancy feature is found by calculating mutual information quotient.The cloud-based technique is the hybrid-based fault detection technique, where the data collected from sensors are stored in cloud storage.Mapreduce is used for parallelism of fault detection tasks.The mentioned methods though several were archived successfully, there still exist disadvantages, e.g., clean data preparation and feature selection before classifying data are not considered.Without noise removed from the data, they would cause misclassification or maybe increase the fault rate.It has failed to organize data if the test data was small that is limited in data learning, so it also leads to misclassification.

Fault detection scheme methodology
The aim of our proposed scheme is to establish a decision function in the CHs that can be used in real time for aggregating the precise data that classified any new collecting data from MNs and forwarding them to the base station in WSN.The proposed scheme of fault detection consists of the steps of collecting data, preprocessing data, identifying faults, selecting features, and classifying data.Figure 4 shows a flowchart of the steps in designing scheme involves the collection of data, preprocessing of data, identifying the fault, selecting the features, and classification of data.
The detail of the steps of the designing scheme is presented as following subsections.

Data collection
A dataset with the noise of the collected data from various sources by the sensor nodes for a system input would cause misclassification data.The datasets should be "clean" data by removing the noisy before further processing data.One of the preferred techniques used for performing the data cleaning process is called Gaussian smoothing [40].Gaussian smoothing is like doing a filter using the original function convolution with the Gaussian weight.Data cleaning starts with the initial step of the design scheme after collecting data from sensors; filtering noise out from datasets before processing classification is to improve its performance and accuracy.An effective smoothing technique with an approximating function attempts to capture important patterns in the data while filtering noise out of the data.A form of collecting data is a vector of the data-points.Let S i be a smoothed value at position ith with k is kernel size.The full width at half maximum is used as an expression of the extent of function given by the difference between two extreme values of the independent variables at vector data is equal to half of its maximum value.
where σ is the width of the curve and u i is the distance from the origin point i in the horizontal axis.If a current spike occurs in collecting data, that could be the noise value, and the smoothing cost will be calculated and substituted them [41].A weighted average of smoothed value is for the new points that are calculated as follows.
where w j is the weighting factor of smoothing.The advantage of the weighted average is that considered for a straightforward implementation that is for every attribute in the resulting data, and fewer values in the weighted sum.

Data preprocessing and attribute selection 3.2.1 Preprocessing data
There are some types of faults based on the data-centric in WSN for sensor readings such as due to hardware failure, software failure, and communication failure [42].This model of data gathered consists of the triplet d (n, t, f(.))where n denotes the sensor which senses the data, t means the time the information is detected, and f(.) denotes the function of sensed data at time t by node n.
The selected features from the smooth dataset after identifying the fault are selected by applying a technique called minimum redundancy maximum relevance (MRMR) as an effective filter [39].The less redundant and more irrelevant of selecting features are identified by the MRMR algorithm to find the relevance with mutual information difference and to find the redundancy with mutual information quotient.The calibration fault and battery fault are also a significant fault type that affects the data-centric fault system.The time data fault occurs when the sensor failure or due to environmental conditions.The function of fault identification is formulated as follows.
where α, β, and x denote the offset, gain, and sensed data respectively, and γ denotes the noise which can be neglected.For example, it can be described as gain fault when the sensed data is different from expectation, so f(x) = x; offset fault is with f(x) = α + x, where α is a constant value that is added to sensed data; hardware fault describes as sensed data that is null or 0, so f(x) = null; a hardcover fault is detected data increases above the maximum threshold, so x ≥ θ where θ is the maximum threshold.

Attribute selection
Attribute selection is called variable selection, or feature selection, or variable subset selection that is a process of selecting the subset of relevant attributes concerning the output category [43][44][45][46].The data training time and the over-fitting could be reduced due to applying attribute selection.The models are easy to interpret if attribute selection is figured out.Attribute selection on timeseries data is crucial as the redundancy among the features.Attribute selection is distinguished into three main categories, which included the filter, wrapper, and embedded methods.The filter approach uses statistical methods to set the score for each attribute.The rating ranks the characteristics, and the elements with the highest rank are considered, and the rest is ignored.Some of the filter methods include chi-squared tests, information gain, and correlation coefficient scores.The wrapper approach uses a stochastic process in which a subset of attributes is evaluated and compared with other combinations.These scores are assigned based on the accuracy of the model.The heuristics of the features are also considered.Cross-validation is done to improve feature selection.Characteristics are passed forward and backward to add or remove attributes.Some of the wrapper methods include recursive attribute elimination algorithm and back-forward algorithm.The embedded approach uses built-in feature selection methods.Inbuilt functions are used to reduce over-fitting.Examples of embedded methods include regularized trees and mimetic algorithms.
A filter approach as the MRMR is used in this paper for connecting to output with maximum relevance and left out elements that are redundant as minimum redundancy.The attributes are selected by applying an objective function as a greedy search function of relevance and redundancy.Two types of objective functions commonly are mutual information difference (MID) criterion to calculate relevance and mutual information quotient (MIQ) criterion to calculate excess.The MID measures how much the information is shared between two independent variables.Two variables u and v of the probability distribution are independent, relating mutual information is formulated as follows.
where A(U, V) is the relating mutual information with probability distribution; p(u, v) is the joint probability of U and V; p(u) and p(v) are the marginal probability of U and V respectively; p(U = u| V = v) is the conditional probability of U and V.

Training and classifying data 3.3.1 Training dataset
There are two phases of the fault detection solution in the proposed scheme: the data learning and real-time decision-making stages.In the data learning phase, the essential elements of the data are respected and maintained in the process.The data learning stage also uses a statistical learning method.The needed experience from the expertise to resolve different problems affecting WSNs is applied in learning data phrase because the classification based on data learning allows using expertise in making decisions.The classifiers and the decision function are implemented in the cluster head in WSN for aggregating accuracy data.The aim is to establish a real-time decision function in CHs to classify any new collecting data from sensor node members.
A labeled dataset is used as a learning database.It is composed of a set of regular data and a set of erroneous data.Figure 5 shows two phases in a model of the fault detection solution.
In the decision-making phase, a new data vector is constructed with blocks of data measurements V t that included three measures (V t , V t − 1 , V t − 2 ).The decision function will makeover the new data vector.If its result is positive, it belongs to the standard case (a class of normal data functionality); otherwise, it is considered as a faulty case.The computationally inexpensive by applying a simple decision function used in the cluster head that makes the proposed scheme very efficient with sensors as limited resource nodes.

Classifying data
A part of a dataset with the selected attributes would be used to train the dataset by applying the model learning, the kernel function, the cross-validation, and expert's experience values.After the dataset is trained, the classifier model would be applied to test data for classification.Figure 6 shows a model of class attributes of fault detection solution.The decision function for fault detection can decide whether the attribute data belong to a class or not.
Let x 0 , . ., x n and c 0 , . ., c k be attributes and classes respectively, where n and k are the numbers of attributes and classes involved.The probability of the attributes occurring in each category is determined and returned to the most likely category.P(c i ) is the proportion of the dataset that falls in category c i .
The naive Bayes probability model is an independent attribute model that can derive constructing a classifier.The classifier combines the model with a decision rule.The probability of a collected data is estimated character belongs to a specific category that can process classifying with naive Bayes.The most substantial likelihood received data point's attributes are to pick the c i by naive Bayes.Each class, P(c i |x 0 , …, x n ) is calculated for classification, and a faulty detection strategy is to predict as policy follows.
One common practice is to pick the most probable hypothesis; this is called the maximum a posteriori.The corresponding Bayes classifier is the function that assigns a class label c i .In the classification, an attribute can be replaced with a new adjusted set of attributes as the category c i in collecting data.

Setting parameters
Assumed an N-node topology of cluster-based WSN was deployed in scattering the area of M × M randomly, where N is a number of nodes that can be 100, 200, 300; M is a length measurement of the deployed area that can be 200, 300, 400 m.The network has a base station (BS) that operates with an unlimited power supply.BS the aggregated data from CHs.The characteristics of WSN operation were assumed that behaving like scheduling periods of packet transmission time.Table 1 lists the initial values for setting the parameters of the experiment.
The information of the packets such as data transmission time and source node IDs received by the CHs are aggregated and forwarded to the BS.Data were randomly picked up by member nodes and were forwarded to the CHs.Then, the CHs will pack the data to be packets and transmit them towards the BS node.
There are two circumstances: default and adjusted options of the cluster in WSN.The default option is the formed clusters without any adjustment from its outside.However, the customized option is applied to the unequal group for balancing energy in the WSN (mentioned in Section 4.4).

Visualization results with default option
The attributes, e.g., temperature, humidity, light, network status, could be "normal" or "faulty."For an example of the network status, if the attribute is class labeled "normal," the network consists of no defective sensor.Otherwise, the system includes at least one faulty sensor in both the training and testing phase.Figure 7 shows a visualization of training and testing set results.The collecting dataset is taken from outdoor data collection from multi-hop WSN with a total of 4001 samples that consist of temperature measurements for 5-min period of scheduling loop for packets data with a total of 60 min.
Different scenarios are simulated, such as some set faulty nodes within the network, i.e., increasing or decreasing temperature, humidity, and sensed data damaged in traffic congestion conditions.Under each setting conditions, no-fault network and different numbers of faulty nodes within the system are generated.For Nnode topology, there are some combinations of faulty nodes with varying from 1 to 5, respectively.There are about 200 data packets under each scenario generated by sensor nodes randomly.

Measurement results
The metrics of the detection accuracy (DA), the true positive rate (TPR), and the false positive rate (FPR) are used to evaluate the accuracy of the proposed technique as follows.

DA ¼ number of faulty data identified total number of faulty data present ð9Þ
where DA is detection accuracy that is clarified as the ratio of the number of erroneous data identified to the total number of current incorrect data.

TPR ¼ number of faulty data identified as faulty total number of faulty data ð10Þ
where TPR is the true positive rate that is classified as the ratio of some faulty data identified as faulty to the total number of incomplete data.It refers to the quantity that predicts the true positive as a positive.
FPR ¼ number of non faulty data identified as faulty total number of faulty data Here, FPR is the false positive rate that is classified as the ratio of some non-faulty data identified as faulty to the total number of incomplete data.Table 2 summarizes the results of the training accuracy of various fault types.
The experimental results of the proposed scheme for the classification dataset of collecting temperature are compared with the cases of the methods, e.g., the support vector machine (SVM) [26], the decision tree (DT) [36], the hidden Markov model (HMM) [38], and the cloud computing scheme (CLOUD) [37] concerning the false positive rate of training set.In the measurement of the results of the proposed scheme in comparison with other methods, a mathematical tool known as the Hausdorff metric [25] is used to determine the distance difference between two datasets.Assumed, there are two non-empty of subsets A and B; the distance between them calculated as follows.where D H (A, B) is Hausdorff distance between two subsets A and B; sup and inf are the supremum and infimum respectively.Figures 8 and 9 depict the comparison of the proposed scheme for the classification of a collecting temperature dataset with the SVM, DT, HMM, and CLOUD methods on the faulty of hardware errors and data-loss fault respectively in the scenario of the adjusted option.It can be seen that our proposed method outperforms other competitors in that the average outcomes of DA are at 93.1% and 89.0% on the hardware faulty and data-loss fault respectively.
Figure 10 shows a comparison of the proposed method according to FPR with the SVM, DT, HMM, and CLOUD.The proposed method provides the best value of FPR that helps to make a significant and essential improvement of FPR as compared with others.The growth is starting from 59% compared with the SVM and reaches 59% compared with the DT, HMM, and CLOUD.

Adjusted options results
Due to the topology of the clustering WSN fashion, the system often falls into the hotspot problem.It means Fig. 8 Comparison of the proposed method for the classification of collecting data with the SVM [26], DT [36], HMM [38] and the CLOUD [33] on the hardware faulty Fig. 9 Comparison of the proposed method for the classification of collecting data with the SVM [26], DT [36], HMM [38] and the CLOUD [33] on the data-loss fault that the clusters that are closer to the BS is getting hotter than the other groups that are far away [1,10].Because the group is the closer BS, the more profoundly is the traffic load that causes coverage issues of hotspot problems.It is necessary to adjust and amend this situation of faulty nodes according to the cluster WSN.The affection of a faulty node can affect its distributed neighbors of cluster size [1].The calculations for the posterior fault probability of every node can affect the results of the classification.The fault node causes the similarity status to its neighbors in the cluster.The fault probability should be adjusted by exploiting the cluster's size.The new confidence of nodes is figured out as adjusting follows.
where c t i j is the confidence of node j in the cluster i; t is the current time of generation; R c is the ratio adjusting parameter that is determined as follows.
where d max , d min , and D j are the maximum and minimum distance of the CHs in the network to the BS and the distance from node CH j to the BS; R max is the maximum value of competition radius; β and α are the weighted factors with value in [0, 1]; E r presents the residual energy of CH j .The probability of the faulty nodes' confidence is calculated as follows: where P x i and P x ik are the probability of the faulty node x ij and x ik respectively.Figure 11 shows a comparison of the proposed scheme for the classification of a collecting dataset of WSN with the SVM, DT, HMM, and CLOUD methods for different faulty, e.g., data loss, hardware, drift, and gain fault according to the DA measurements.
Figure 12 shows a visualization of the comparison between the adjusted and default options of the testing set results. Figure 13 depicts the comparison between the adjusted and default options of the proposed scheme for the testing set with different faulty, e.g., data loss, hardware, drift, and gain faults according to the DA measurements.Observing the results from Figs. 12 and 13, it is seen that the proposed scheme with adjusted options can provide more improved accuracy that reaches at 95%, 98%, 91%, and 90% in comparison with default cases for data loss, hardware, drift, and gains fault according to the DA measurements.

Conclusion
In this paper, a new scheme of collecting data classification for aggregating data in cluster heads (CHs) in hierarchical WSN based on the naive Bayes The system design of the proposed scheme consists of majority components such as the collecting and preprocessing data, identifying and normalizing attributes of data, and training and testing datasets.The noise is removed from the data that can be sufficient to obtain more accurate.The elements of selected attributes in datasets can enable detection accuracy.In the experimental section, the system was tested with the collecting data by naive Bayes classification.Compared with the other methods in the literature, e.g., the support vector machine (SVM), decision tree (DT), hidden Markov model (HMM), and cloud computing scheme (CLOUD), it shows that the proposed method offers an effective way of forwarding the correct data for WSN applications.The system provides an accuracy of more than 97% throughout the data learning process.In data testing, the efficiency of the improved data fault detection offers more precise than any other competitive systems.
In future work, the proposed scheme may be further improved by adopting some efficient approaches [47][48][49] for optimal classification parameters; and it also may hybridize with the method of the neural network [50].

Fig. 3 A
Fig. 3 A classification model from the data in the learning method

Fig. 4
Fig.4The proposed fault detection scheme.The figure shows a flowchart of the steps in designing scheme involves the collection of data, preprocessing of data, identifying the fault, selecting the features and classification of data

Fig. 5
Fig. 5 Two phases in the model of the fault detection solution

Fig. 7 A
Fig. 7 A visualization of the training and testing set results

Fig. 10
Fig. 10 Comparison of the proposed method for the classification of a collecting temperature dataset with the SVM, DT, HMM and CLOUD methods on concerning the FPR metric

Fig. 11
Fig.11Comparison of the proposed scheme for the classification of a collecting dataset of WSN with the SVM, DT, HMM, and CLOUD methods for different faulty, e.g., data loss, hardware, drift, and gain fault according to the DA measurements

Fig. 12 A
Fig. 12 A visualization of the comparison between the adjusted and default options of the testing set results

Table 1
Initial values for setting parameters of the experiment

Table 2
Summary of the effects of training accuracy of different fault types