ML Algorithms
ML Algorithms
1. Supervised learning:
Supervised learning uses labeled training data to learn the factor of input
that can map the input to the output.
These algorithms are mainly grouped based on machine learning
algorithms for classification and machine learning algorithms for
regression.
• Classification: To foresee and predict the result of a given input
where the output is a class. For example, labels such as cat
and dog, good and bad .
2. Unsupervised learning:
3. Reinforcement learning:
Reinforcement learning is a machine learning algorithm, all about
taking suitable action to maximize reward in a particular situation.
Reinforcement algorithms usually learn optimal actions through
trial and error. The machine learning algorithm example for this
type is – where a robot can learn to avoid collisions by receiving
negative feedback after bumping into obstacles.
1. Linear Regression:
In Linear algebra, the relationship between the input variables (x) and
output variable (y) is expressed as an equation of the form y = mx + c, the
equation implies even for linear regression. The goal of linear regression
is to find out the values of coefficients a and b. Here, ‘c’ is the intercept
and ‘m’ is the slope of the line.
Fig1 : Linear Regression
Figure1 shows the plot between x and y values for a given dataset. The
aim is to fit a line that is nearest to most of the data points, this would
reduce the distance/error between the y value of a data point and the
line.
2. Logistic Regression
It is named after the transformation function used, called the logistic
function given by f(x)= 1/ (1 + exponential(-x)), which is an S-shaped curve.
This algorithm is named ‘Naive’ as it assumes that all the variables are
independent of each other.
WEATHER TRAVEL
Windy No
Cold Yes
Sunny Yes
Windy Yes
Windy Yes
Cold Yes
Sunny No
Sunny No
Windy Yes
Sunny Yes
Windy No
Cold Yes
Cold Yes
Sunny No
4. Decision Tree:
These algorithms can be used to solve both regression and classification
problems. Decision tree uses the tree representation to solve the
problem.
• Each leaf node corresponds to a class label and attributes are
represented on the internal node of the tree.
• We can represent any boolean function on discrete attributes
using the decision tree.
• Each leaf node represents the output variable(y). The internal
nodes and root node are the input variables. The model is used as
follows to make predictions: walk the splits of the tree to arrive at
a leaf node and output the value present at the leaf node.
The decision tree in the figure classifies whether a person is fit or not. It is
accomplished by considering the person’s routine factors such as age,
diet and physical activity.
6. Apriori:
Lift is the rise in probability of having {Y} on the cart with the knowledge of
{X} being present over the probability of having {Y} on the cart without any
knowledge about presence of {X}.
7. K-Means:
The ‘means’ in the K-means refers to averaging of the data; that is, finding
the centroid. The objective of K-means is to group similar data points
together and discover underlying patterns. To achieve this objective, K-
means looks for a fixed number (k) of clusters in a dataset.
Fig5: K-Means
Let’s say that you want to predict the income of a company in coming
years. You have lots of information available, the income in the past years,
publicly available economic indicator, efficiency of employees and so on.
Despite being an overwhelming number of variables to consider, this is so
tiring to take into account.
Data Science is an ever-growing field, there are numerous tools available in the
market. It is a daunting task to remember all the functions and flow of each
concept. To ease our approach towards machine learning algorithms we have
something called as cheat sheets. This machine learning cheat sheet will help you
choose the appropriate machine learning algorithms for your modeling solution.
The cheat sheet takes into account the data nature of your problem and then
suggests the best algorithm for the job.
I have listed a few machine learning algorithms cheat sheets which are best in
the market,
There are a wide range of algorithms available to train and make your systems
learn, while it becomes important to choose the best one for your application
among these. At the end of the day it’s a trial and error approach which can
help you choose the right algorithm for your model.