## 2 State of the Art
### Selected Classification and Regression Algorithms  
Due to the fact that this work uses supervised machine learning, selected classification and regression algorithms are presented below. The prediction and classification algorithms are the two main types of prediction algorithms, where classification is used to predict discrete values and regression is used to estimate continuous or ordered values. In the case of classification algorithms, several basic algorithms presented below can be distinguished [36]. * **Naive Bayes classifier** The naive Bayes classifier is a two-class and multiclass classification algorithm. The \"naivety\" of this classifier lies in the fact that it assumes the independence of individual variables, which is rarely the case in reality. Its operation is based on calculating the probability of events. Therefore, it is classified as one of the simplest algorithms [9]: \[P(c_{i}|x)=\frac{P(c_{i})P(x|c_{j})}{P(x)}\] (1) where \[P(c_{i}|x)\] is the probability that the example x belongs to a category \[c_{i}\], \[P(c_{i})\] is the probability of the x \[c_{i}\] category occurrence in general, \[P(x|c_{i})\] is the probability of the x \[c_{i}\] category occurs, \[P(x)\] is the probability of the example x occurring. Despite its simplicity and independence of variables, this classifier works very well when the amount of data available for training the model is limited. The Bayes classifier is  
Figure 1: Types of machine learning. also a good choice when CPU and memory resources are constrained. Since this classifier is very simple, it does not tend to overflow and can be trained very quickly. * **Nearest neighbors algorithm** The nearest neighbors algorithm categorizes data points based on their distance to other points in the training dataset. It is one of the nonparametric regression algorithms used to predict the values of random variables. This makes it a simple yet effective way to classify data. Therefore, the assumption of this algorithm is as follows: similar problems have similar solutions. In two-dimensional Euclidean space, the distance can be calculated from the Pythagorean theorem. However, since we rarely analyze a dataset with only two features (two-dimensional), by generalizing the problem of distance to n-dimensional space, the distance function can be defined with the following metric:  
\[d=\sqrt{\sum_{i=1}^{n}(x_{i}-y_{i})^{2}} \tag{2}\]  
This is the most common way to calculate distance, but not the only one. In general, the measure of closeness can be calculated by using methods such as the squared Euclidean measure method, the Manhattan method, and the Chebyshev method. The dependent and independent variables can both be continuous and discrete (categorized). * **Random forests** The random forest algorithm is used for two-class and multiclass classification (Figure 2). Its operation, as the name suggests, is based on classification, which uses a group of decision trees. \[P(c_{i}|x)\]0 Random forest. The random forest algorithm is an improvement of the decision tree algorithm due to the application of the so-called bootstrap aggregation otherwise known as bagging. It consists of creating a few training subsets from the original dataset. This choice is made by random selection. Some of the observations that have not been selected for the training set automatically act as the validation set. Due to this approach, there is no need to divide the data into training and test sets. In the next step, explanatory variables are selected for each of the subsets. Then, the construction of decision trees for each of the subsets follows. The final result is selected by voting; the value that has been predicted by the largest number of individual decision trees is selected. * **Neural networks**  
A neural network algorithm can be used in both classification and regression problems. In the case of classification, neural networks are used for two-class and multiclass classification. The scheme of operation is presented using a directed graph.