Machine Learning
Machine Learning
1)Classification:
Classification is a training method in which the model compares key
characteristics of the new data with the previous information set and classifies
them in groups and subdivisions.
Algorithms:
K nearest neighbours:
One of the well-recognized classification algorithms used the concept of
proximity and similarity to make predictions and classifications of an individual in
grouped data.
KNN algorithm follows the following steps:
Step 1: Calculate the Euclidean Distances
Step 2: Find the K nearest neighbours
Step 3: Consider the majority
General Explanation:
First, the Euclidean distances are calculated for the specific aspect with all other
features of the data set. Then we consider a variable K which represents the
number of neighbours to be considered. In other words, the value of K tells us
the number of comparisons to be made. The minimum (closest) values are
always considered. After significant comparisons, the class is determined.
Example:
In the given example I used K nearest neighbour to determine the genre of the
recently released movie BARBIE.
2) Regression:
The second type of testing involves regression. Regression uses a statistical
approach to predict and define the relationship between variables. In other
words, Regression involves numerical procedures that help us understand how
the behaviour of variables changes by changing their values.
Variable is any quantity that is taken into consideration not having a fixed value.
Variables are changeable and adaptable
Linear Regression:
It is a model that helps us estimate the relationship between variables. As the
word linear suggests, this model follows the basic formula of slope-intercept form
for linear equations often represented by:
Y=mx+b
Where m is the slope and b represents the y-intercept
General Explanation:
The process of linear regression involves many basic mathematical concepts,
Forst raw data is collected for both of the variables x and y and then the mean of
x and y are calculated, After the calculation of respective means the
corresponding deviations are calculated, by subtracting the original values of
variables by their means, After obtaining deviation of both the variables take the
product of these deviations, sum the deviations and square the deviations of the
dependant variable(x)
After calculating all these values and completing your table, the slope can be
calculated as follows:
M=Sum of Product deviations/ Sum of Square of deviations of x
After calculating the slope the y-intercept can be calculated as follows :
b=Mean of y-(slope*Mean of x)
After all these factors can be calculated, any prediction can be made by using
the simple slope-intercept form.
Example:
We want to train a model to predict the pizza prices based on the diameter of the
pizza by linear regression. It can be done as follows;
Training:
After applying a suitable training algorithm , the model is tested by providing
similar questions as in the data set and learning accuracy is determined.
Advantages:
Machines and appliances trained by supervised machine learning algorithms
have higher accuracy and success rates as the model is trained many times with
similar data sets that increase precision and accuracy.
Applications:
Supervised Machine Learning is often used in facial recognition systems, spam
email detection systems, healthcare, and predictive analysis of trends in
marketing.