## 2 Understanding Supervised Machine Learning Algorithms  
A training set is used in supervised learning to instruct models to produce the desired results. This training dataset has both the right inputs and outputs, enabling the model to develop over time. The loss function serves as a gauge for the algorithm's correctness, and iterations are made until the error is sufficiently reduced. When using data mining, supervised learning may be divided into two categories of issues: classification and regression. In order to accurately classify test data into different categories, classification uses an algorithm. It identifies particular entities in the dataset and makes an effort to determine how those things should be defined or labeled. Linear classifiers, support vector machines (SVM), decision trees, k-nearest neighbor, and random forests are examples of common classification algorithms. To comprehend the relationship between independent and dependent variables, regression is used. It is frequently used to produce estimates, including those for a company's sales revenue. Popular regression algorithms include linear regression, logistical regression, and polynomial regression. The bagging method serves as the foundation for Random Forest, which employs ensemble learning. The outcome of all the trees is combined once as many trees as possible have been created on the subset of data. In doing so, it lessens the issue of overfitting in decision trees, as well as lowering variance and raising accuracy. In contrast to decision trees, which only build one tree, Random Forest creates many trees and integrates their results. It builds 100 trees in the Python Sklearn module by default. This algorithm needs a lot more resources and computing power to accomplish this. The decision tree, on the other hand, is straightforward and doesn't need as much computing power. Compared to decision trees, Random Forest requires much more time to train since it generates many trees (instead of just one tree) and bases decisions on the majority of votes. Although decision trees do not simultaneously take into consideration numerous weighted combinations, they have the benefit of not requiring any feature modification when working with non-linear data. One of the quickest ways to determine the most important factors and relationships connecting a group of variables is to use a decision tree. We can add new variables or features to the result variable more effectively using decision trees. Because there is no outside influence or impact from missing data in a tree node when using a decision tree, less data is needed. The time complexity for performing this operation is extremely high and keeps rising as the number of records rises. Training a decision tree with numerical variables can take a long time. Overfitting of data is typically required for decision trees. The output variance in the overfitting problem is extremely high, which causes numerous errors in the final estimation and can result in output that is extremely inaccurate. Obtaining zero bias will result in large variance (overfitting). Small alterations in the data in a decision tree may result in the generation of a complicated new tree. In the decision tree, this is referred to as variance, and it can be reduced using techniques like bagging and boosting. The gradient boosting trees and random forests differ from one another primarily in two ways. We train the former in a systematic manner, correcting the mistakes of the prior trees with each new tree. In contrast, we independently build each tree in a random forest. As a result, we are unable to train the gradient-boosting trees in parallel whereas we can train a forest. The simplest definition of artificial neural networks (ANN) is a model of the human brain made up of neurons. The human brain contains roughly 100 billion neurons. Between 1000 to 100,000 connections exist between each neuron.