# Fault Detection in Wireless Sensor Networks through the Random Forest Classifier
## 1 Introduction  
Wireless Sensor Networks (WSNs) are a set of independent sensor devices, which are connected by wireless channels. These are comprehending structures that deal with the surroundings closely. They are designed to perform very limited tasks. Sensors are physical devices that perform the job of assembling details about a physical object or process, including the occurrence of a change in an event like a drop in temperature or pressure [1]. WSNs have significant potential for real-time monitoring, and they are already utilized in the fields of military applications, health monitoring, industrial applications, environment surveillance, etc. Some of the constraints of WSNs include limited node energy and storage space. WSNs are normally deployed in risky, unmonitored, and inaccessible environments, which make them more vulnerable to failures. These failures can be further divided into three categories:* software failures,
* hardware failures, and
* communication failures. The faults can be categorized into the following categories [2] according to the sensed data:
* Offset fault: Due to a calibration error in a sensing unit, a displacement value is added to the actual sensed data. * Gain fault: When the change rate of sensed data is different from the expected rate. * Stuck-at fault: When the variation in sensed data series is zero. * Out of bounds: When the observed values are out of bounds of expected series. * Spike fault: When the rate of change of measured time series with the predicted time series is more than the expected changing trend. * Noise fault: When a randomly-distributed number is added to the expected value. * Data loss fault: When there are some missing data during a specific time interval in the sensed values. * Random fault: This is an instant error, where data are perturbed for an observation. The acronyms are listed below in Table 1. \begin{table}
\begin{tabular}{c c} \hline \hline AN & Absolute Norm \\ ANOVA & Analysis Of Variance \\ BBA & Basic Belief Assignment \\ CCAD-SW & Collective Contextual Anomaly Detection using Sliding Window \\ CNN & Convolutional Neural Network \\ CMOS & Complementary Metal Oxide Semiconductor \\ DNN & Deep Neural Network \\ DA & Detection Accuracy \\ ECOC-SVM & Error-Correcting Output Coding-Support Vector Machine \\ EN & Euclidean Norm \\ ED & Euclidean Distance \\ EAD & Ensemble Anomaly Detection \\ FFNN & FeedFoward Neural Network \\ GA & Genetic Algorithm \\ GLDT & Gradient Lifting Decision Tree \\ GLR & Generalized Likelihood Ratio \\ KDE & Kernel Density Estimation \\ LNSM & Log-Normal Shadowing Model \\ MMSE & Minimum Mean Squared Error \\ MSE & Mean Squared Error \\ MLP & Multilayer Perceptron \\ MCC & Matthews Correlation Coefficients \\ OCSVM & One-Class Support Vector Machine \\ PSO-ANN & Particle Swarm Optimization Artificial Neural Network \\ PDF & Probability Distributed Function \\ PNN & Probabilistic Neural Network \\ PDR & Packet Drop Ratio \\ RF & Random Forest \\ SVM & Support Vector Machine \\ SGD & Stochastic Gradient Descent \\ SVR & Support Vector Regression \\ SHM & Structural Health Monitoring \\ SCADA & Supervisory Control And Data Acquisition \\ TPR & True Positive Rate \\ TA-SSVM & Trend Analysis least Squares Support Vector Machine \\ WSNs & Wireless Sensor Networks \\ XGBoost & Extreme Gradient Boost \\ \hline \hline \end{tabular}
\end{table} 
Table 1: List of acronyms. There are many other faults that can occur continuously and simultaneously over a period of time in sensed data, such as: calibration error, data aggregation fault, etc. Fault detection mechanisms are considered to be of great importance to guarantee the normal functioning of WSNs. They should be precise and rapid to limit loss and to determine the status of data explicitly. However, it is a challenge to detect faults due to sensor's constrained characteristics [1]. Many researchers have worked on the anomaly detection mechanism with different perspectives. Some techniques are distributed, centralized, or hybrid [3].