0% found this document useful (0 votes)
7 views6 pages

Understanding Support Vector Machines and Algorithms

The document provides an overview of various machine learning algorithms, including Support Vector Machines (SVM), Random Forest (RF), Naive Bayes (NB), Latent Dirichlet Allocation (LDA), Stochastic Gradient Descent (SGD), and Decision Trees (DT). Each algorithm is described in terms of its classification capabilities, underlying principles, and applications in data categorization. The document highlights the strengths and specific use cases for each algorithm, illustrating their importance in handling different types of data.

Uploaded by

salar AHMED
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views6 pages

Understanding Support Vector Machines and Algorithms

The document provides an overview of various machine learning algorithms, including Support Vector Machines (SVM), Random Forest (RF), Naive Bayes (NB), Latent Dirichlet Allocation (LDA), Stochastic Gradient Descent (SGD), and Decision Trees (DT). Each algorithm is described in terms of its classification capabilities, underlying principles, and applications in data categorization. The document highlights the strengths and specific use cases for each algorithm, illustrating their importance in handling different types of data.

Uploaded by

salar AHMED
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Support Vector Machines (SVMs)

A support vector machine (SVM) is a controlled machine learning technique developed in mid-
1990s that solves two categorization problems using classification strategies. They may
categorize fresh text after providing an SVM model with sets of labelled training data for each
class. Support vector machines (SVMs) were used for class classification issues, but with the
rapid advancement of computer technology, data network technology, and data processing
technology for the identification and monitoring of massive amounts of data, the class
classification technique no longer fulfills individual’s requirements.
The machine learning algorithm (SVM) is a unique small-sample based data acquisition
approach that outperforms previous techniques in many ways since it is based on the notion of
structural risk reduction rather than standard empirical risk mitigation approach. The optimum
surface derived from the continuously separable situation is described in two dimensions by the
support vector machine. H separates two kinds without making any mistakes. H 1 and H2 are
locations that pass through H’s most recent position. The gap between H 1 and H2 is referred as
the class interval. The purpose of the optimal differentiating surface, also known as the biggest
class interval, is to provide error-free segregation of the two classes of data.

Figure 1-Optimal Separating Surface

There are several hyperplanes from which to choose to split the two kinds of data points. The
hyperplane (which in two dimensions is essentially a line that optimally differentiates the
identifiers is produced by a support vector machine utilizing these datasets. This line marks the
end of the decision-making process. SVM can be classified in two different types:

Linear SVM: Linear support vector machine (SVM) is an algorithm that is used for the data
which can be linearly separable, which implies that if a dataset can be categorized in two
different categories using only single horizontal line, it can be then referred as linearly separable
data, and the classifier used is known as linear SVM. The optimal category function for the
linear separable SVM is:
f ( x )=sgn ¿
Non-Linear SVM: Non-linear support vector machine (SVM) algorithm is used to classify
the data that is non-linearly separated, non-linear dataset consists of the data that cannot be
categorized as a straight line and the classifier used for the classification purpose is called as
non-linear support vector machine (SVM).

Random Forest (RF) Algorithm


A random forest is a classification system made up of a number of clustered tree classifiers
such as:

{h ( x , Θk ) , k=1 , … }

Where (Θ k ¿represents the individual symmetrically distributed random vectors. As the name
indicates, a random forest (RF) is made up of huge number of discrete decision trees that work
together as an array. Each decision tree in the RF algorithm produces a class prediction and
points are associated with each class. The class with maximum points becomes the prediction
of the class. Developing an array of trees and allowing them to select for the most preferred
class results in significant increase in classifying reliability. Random vector that regulate the
development of each tree in the array are frequently constructed in order to develop these
populations.
The random forest (RF) algorithm is a bagging technique modification that uses both bagging
and feature randomization to generate an unassociated decision trees forest. Feature
randomization is also called as feature bagging or “the random subspace method” produces a
unique set of attributes, resulting in little association between decision trees. This depicts a
distinction between RF and decision trees. Moreover, decision trees analyze all potential data
splits whereas, random forest (RF) pick just a set of data splits.

Figure 2-Random Forest

There is a distinction between random forest utilization for the classification and regression
purposes. When random forest (RF) is used for the classification purpose each tree generates
and send a class of votes towards it and then it is classified based on the vote’s majority.
Whereas when RF is used for regression purpose each tree generates its prediction and then it
is averaged at a common point x. Similarly the input value (m) change for both classification and
regression. The value of m for classification becomes m = √p whereas, the value of m for
regression is p/3.

Naive Bayes (NB) Algorithm


Naïve Bayes (NB) algorithm is a subclass of Naïve Bayesian decision theory. It is named as
Naïve Bayes (NB) because of the generation of simple assertions. A Naïve Bayes classifier
presumes that the existence of one characteristic in the class has no impact on the existence of
any other feature. Naïve Bayes algorithm is based on the Naive Bayes probability that when an
event occurs there is a probability that something have already occurred such as:

P ( B| A ) . P( A)
P ( A|B )=
P(B)
Despite the simplification of Naïve Bayes algorithm, it can categorize data very well. A possible
rational for the implicit independent supposition is that if the data is about politics, this is solid
proof of the types of other terms contained in the text. In, this respect Naïve Bayes is an
acceptable classifier with minimum data storage capacity and quick development; it is used in
time sensitive scenarios such as automatically categorizing web pages into groups and
detection of spam.

Naïve Bayes Classifier


The Naïve Bayes classifier correlates to a Naïve Bayesian system. In this regard, C represents a unique
class identifier and m aspect values X i. Similarly C shows the classification model and x i represents
the value of a feature Xi. A Naive Bayes classifier induces:
Pr ¿

Figure 3-Naive Bayes Classifier

Naive Bayes model consist of different types such as:

Gaussian: The Gaussian paradigm is based on the assumption that characteristics have a
normal dispersion. This implies that if indicators accept consistent values rather than
discontinuous values the model presumes that these values are drawn from the Gaussian
distribution.
Multinomial: This classifier is used when the data is multinomial dispersed. It is generally
utilized to solve document categorization difficulties, indicating which domain a specific
document relates to.

Bernoulli: The working of Bernoulli’s classifier is similar to that of multinomial model, except
that the unique variables are Boolean variables. For example whether or not if a specific term
appears in a document. This type of classifier is used for performing document categorization
jobs.

Latent Dirichlet Allocation (LDA) Algorithm


LDA algorithm presumes that each document is the result of statistical generating process. That
is, each document is a conglomeration of subjects and each topic is a conglomeration of words.
The most typical application is to find a customer shared by documents in a data set. Each
assessment represents a document, the factors reflect the existence (or frequency count) of
each word, and the classification represents the subjects. Because the approach is unregulated,
the topics are not stated in advance material. Topics are learnt as a probability dispersion
across the words in each text. Each document is characterized as a collection of topics. For
each document w in a dataset D, LDA expects the following generating mechanism:
LDA’s probabilistic subject model is made up of two databases (matrices). The first set
determines the likelihood of picking a certain portions while sampling a specific subject
(category). The second set determines the likelihood of picking a certain subject when
evaluating a certain document or combination. The interdependence among the various
variables may be described by simply using plate notion, which is commonly used to depict
probabilistic data visualization (PGMs). The boxes are plates that depict duplicates, or entities
that are duplicated. The outermost plate provides documents, while the interior plate provides
repetitive word places in a specific document; each location is connected with a selection.

Figure 4-Graphical Model Representation of LDA

The prediction making process of LDA algorithm is simply depending upon the Naïve Bayes
theorem probabilities. They generate suggestions based on the likelihood that a unique input
data corresponds to one of the classes. The class with maximum likelihood is designated as the
output class, and then the algorithm creates a prediction. The prediction is made easily by
Bayes theorem, which predict the likelihood of the product class given the data. They also
employ the likelihood of each class as well as the likelihood of the data pertaining to each class.

Stochastic Gradient Descent (SGD) Algorithm


Descent algorithm is a prominent system integration strategy in Machine Learning (ML)
that can be utilized with majority, though not all machine learning algorithms. The term
“Stochastic” refers to a mechanism or a procedure that is associated with a random
selection. In SGD algorithm for each cycle few samples are chosen at random rather
than selecting entire dataset. Gradient Descent uses the term “batch” to refer to the
overall amount of samples from a database that are utilized to calculate the gradient for
each repetition. In traditional, Gradient Descent algorithm such as batch GD, the batch
is assumed to be the entire database. Although considering the entire dataset is quite
valuable for locating coefficients in a less chaotic and randomized way the only
challenge occurs is the size of the dataset if large dataset appears the algorithm’s
efficiency decreases.
Because just one sample is selected at once from the set of data randomly for each
repetition in SGD, the route travelled by the algorithm to achieve minima is typically
louder than in a traditional gradient descent method. But that is not necessary because
of the strategy employed by the algorithm is unimportant as long as the desired point
(minima) is achieved in a much shorter amount of time. In most of the cases gradient
descent algorithm is preferred over the batch algorithm because of its efficiency and
iteration process.

Figure 5-Path Taken by SGD Algorithm Figure 6-Pth Taken by Batch Gradient Descent
Decision Tree (DT) Algorithm
Decision tree (DT) algorithms are well machine learning approaches that have been employed
for a broad variety of purposes particularly classification challenges. A probabilistic approach for
dividing datasets is provided by decision trees. Regression or ANOVA models, which depicts
correlations between factors as cross-products, are further data analysis strategies. In a
decision tree (DT), the algorithm begins at the node and works its way up to determine the class
of a testing dataset. This algorithm analyzes the properties of the node properly and then
follows the branch and leaps towards the next node depending on the similarity of dataset.

You might also like