**Some cons of using random forest algorithm:**

1.Random forests are found to be biased while handling express variables;

2. Sluggish training;

3.Now not suitable for linear techniques with a whole lot of sparse functions.

WSN is a difficult problem due to the diversity of deployment and the restrictions within the sensors'sources. This supervised device mastering-based total approach is considered to scrutinise the behaviour of sensors through their statistics for the detection and prognosis of faults. Maximum of the faults that generally arise in WSN are considered: handover, glide, spike, erratic, information-loss, stuck, and random fault. A hybrid strategy was put forth [16] for real-time network intrusion detection systems (NIDS). For feature selection, they use the random forest (RF) algorithm. In order to remove the unnecessary features, RF presents the variable importance as numeric values. The experimental findings demonstrate that the new strategy is quicker and lighter than the prior methods while still ensuring high detection rates, making it appropriate for real-time NIDS.

#### *2.1.2.6 Bayesian statistics*

Bayesian records are the mathematical method for calculating possibilities wherein inferences are subjective and get updated while extra facts are delivered. This record is in comparison with classical or frequentist information where probability is computed through comparing the frequency of a specific random occasion for an extended length of repeated trials where inferences are intended to be the goal. Those statistical inferences are the manner of extracting conclusions out of massive datasets via studying a small portion of sample statistics. For this, the data professionals:


As Bayesians, a concept of a notion, called a previous, gain some information and use it to update the notion. The final results are called a posterior. As attain even greater facts, the antique posterior becomes a brand new prior and the cycle repeats.

This system employs the Bayes rule:

$$\mathbf{P(A|B)} = \mathbf{P(B|A)}^\* \ \mathbf{P(A)}/\mathbf{P(B)}$$

P(A|B), examine as "possibility of A given B", shows a conditional chance: how possibly is A if B happens.

In WSNs, these styles of Bayesian learners are useful for assessing event consistency. Numerous variations of Bayesian newcomers allow better getting to know of relationships, consisting of Gaussian combination fashions, Dynamic Bayesian Networks, Conditional Random Fields as well as Hidden Markov fashions.
