2.4 Machine Learning
2.4.5 important Algorithms
One of the simplest unsupervised algorithms is K Nearest Neighbor but this is the most popular and widely used. Support Victor machine can be mentioned as supervised machine learning which is also the most popular and widely used. Both of these algorithms will be presented below in detail.
K Nearest Neighbor
It is commonly known as KKN, stands for K Nearest Neighbor. For this algorithm, the K value needs to provide. K value is not fixed, we need to put according to accuracy value at the time of teasing and test. This procedure has been used for im- plementing the subsystem, Traffic Maintenance Sign Detection for Road Condition detection system. So, the details of this algorithm are given below.
Function
For example, 3 color balls can be considered for 3 classes which are in the figure: 2.9, [4]. This will make the understand very easy. Let’s consider a new ball color is gray. KNN will define, its color class. KNN algorithm will do in three steps. Step 1. It will calculate distance any two points from the new ball. 2, Next the system will find the nearest neighbor among these pairs, step 3. Finally, the majority vote on a class based on the nearest neighbor list. In the figure it is clear. There are 3 colors ball, yellow, pink and blue which are considered as 3 classes, in the figure 2.9. Here it is clear, the distance from gray color to yellow color balls is respectfully 2.1, 2.4 which is the shorter distance. The majority,2 of them voted for yellow. So, the new ball belongs to the yellow color class group [4] .
Figure 2.9: KNN Algorithm [4]
Pseudo Code
This is a very simple and powerful algorithm for application. Here are a few lines for applying to develop a project.
∗ Load the training dada ∗ K value is defined the more accurate value ∗ Need to put level clustering level ∗ Need to take more than 70% for training ∗ Need to take rest for test ∗ Calculate the accuracy for the given tast data. ∗ Adjust the K value for the better value
∗ pass the new data
∗ The result will be carried out by matching the clustering level pros and cons
Some advantages are presented here. This is the most important and simple al- gorithm in the unsupervised algorithm. This is a very simple, easy algorithm to
implement. It can be used for classification and regression problems. This can be used for classification and regression problems. KNN can do not explicitly make a model. It has instant based learning capacity.
Some disadvantages are also given. The biggest problem with KNN is choos- ing the optimum number of number Neighbor. It does not deal with the mission value problem. K-NN algorithm is very sensitive to outliers as it simply chose the neighbors based on distance criteria.
Support Vector Machine
Support Vector Machine provides a powerful mechanism for clustering. Clustering is done based on no prior knowledge. It is known as extreme class. The support vector machine is easy to understand for 2 classes. A hyper-plane or line is drawn which is based on the distance of attributes. It works based on the attributes of the classes. For example, cats and dogs are 2 classes. A decision line needs to be put in between them. But it should be in an optimum way. If it is not in an optimum way then incorrectly classification will be for a dog or a cat class. Here Blue circle has been considered as a cat and pink circle as a dog. The figure is given as an example, 2.10, [5] This is the most important for the support vector machine and training example is ignorable. If an unknown dada comes then we need to find the short distance to the vector hyperplane. The nearest value to the plane will decide the classification.The kernel equation is given here, 2.3. This is a linear support vector machine. It is possible to draw in line with 2 classes of objects. Just we need to break down one-dimensional tow dimensions, but it is difficult for the multiclass. Need to use polynomial function and possible to get the hyperplane Linear kernel.
K(x, y) = xXy (2.3)
Let’s have a look at the multidimensional cases. It needs to change 2 dimensions to 3 dimensions. But it is computationally expensive. The kernel is used to reduce the computation. This is done by using kernel function which provides us nonlinear to liner type conversion. Some popular kernel type is given here. Polynomial kernel, the equation is here,2.4, Radial Basis function kernel, Sigmoid Kernel, etc. It usage a decision tree that is memory efficient. There is a way to use multi-kernel learning which shows very good performance for many applications but it is computationally expensive. Kernel makes 2D plane to 3D object which is given in the fig: 2.11, [5].
Figure 2.10: Classification of 2 dimensional [5]
Figure 2.11: Kernel 2D to 3D [5] Radial Basis Function RBF kernel
K(x, y) = e−p(||x−y||2 (2.5) Random Forest Algorithm
Random Forest is the most popular and most powerful supervised algorithm. It is used for reintegration and classification tasks. It learns from the experiences. This algorithm is based on decision trees. Normally more tree the more robust the prediction which produces higher accuracy. In this algorithm, each tree gets an attribute and belongs to a class. The tree goes under a classification by voting of the other trees of the forest. Take the average of the different trees[35].
Applications
It has many application. Some of the important applications are mentioned here. Broadcasting SMS to customers. Finding medicine with the correct combination of chemical. Also used to identify diseases by analyzing the patient record. In the stock market, it is used to identify stock behavior. In E-commerce, it is used for commanding the customer product. In computer vision, this algorithm is used for image classifications. Assume of cases in the train set in N. Then, a sample of these N cases is taken at random but with replacement. if there are M input variables, a number m ¡ M specified such as each node selected variable m out of M.The best split of m is used to split the node. The value is m is constant while we grow the forest. Each tree is growing. It does not create any problem with the algorithm. Predict the now data aggregation(Majority vote of classification, the average for largest registration)