*2.1.1 Regression algorithms*

If there is a link between the input and output variables and the output has a real or continuous value, regression methods are used. This kind of learning strategy is employed in situations where a relationship between two variables and the changes in one affects the others. In simple words, "Regression exhibits a line or curve that traverses through all the data points on target-predictor graph in such a way that the distance between the data points and the regression line is small". Prediction, forecasting, time series modelling, and establishing the causal connection between variables are its key applications.

Some of the few examples of regression are as follows:


#### *2.1.2 Classification algorithms*

These algorithms are used when we have to classify something into group after getting output into a category. It is a method for classifying observations into several groups according to a condition. Binary classification, such as Yes-No, Male-Female, True-false, etc., refers to an algorithm's attempt to categorise data into two separate groups. Multiclass classification is the practise of choosing from more than two categories. In the classification algorithm, an input variable is transferred to a discrete output function (y) (x).

y ¼ categorical output, f xð Þ¼ y

The primary goal of classification algorithms is to determine the category of a given dataset, and these algorithms are primarily employed to forecast the results for categorical data. Email Spam Detector is the best illustration of an ML classification method. It can also be used to categorise various objects, such as fruits, according to their taste, colour, size, etc. When given new data, a machine that has been properly trained using a classification method may predict the class with ease. It can classify everything, including fruit, automobiles, houses, signs, and more. However, there are numerous ways to perform a same task in order to predict whether a given person is male or a female, a machine has to be trained first and further there are numerous ways in doing so. For predictive analytics some of the commonly used algorithms are:


#### *2.1.2.1 Decision tress*

Decision Tree is a supervised learning technique that is used to effectively handle non-linear data sets [15]. It is a classification learning algorithm. It is a visual representation of every scenario that could lead to a choice. It solves a problem by using a tree representation. The decision tree, as shown in **Figure 10**, resembles a tree that has two different types of nodes: the Choice (Decision) node and the Leaf node. Decisions are made using choice nodes, which have numerous branches, whereas leaf nodes are the results of those decisions and do not have any additional branches. CART, or Classification and Regression Tree Algorithm, is employed in this case to construct a decision tree. It simply asks a question and on the basis of that (either YES/NO) the tree is split further.

The fundamental idea of the decision tree is to test the most significant attribute first. The most important attribute is the one that impacts the classification of an example the most. This will ensure that we obtain the accurate classification with smaller number of tests wherein all the paths in the tree are short and the tree in general is a small one. Decision tree algorithms are used to solve many unresolved

issues in WSNs layouts like link loss, reliability, restore, corruption rate, and mean-time-to-failure (MTTF).
