Machine learning(ML) is an application of artificial intelligence (AI) that provides systems the ability to automatically learn and improve from experience without being explicitly programmed. This is accomplished through building algorithms that can help models learn and respond to their intended use.
Machine learning implementations are classified depending on the nature of the learning response available to a learning system. There is a wide range of Machine Learning algorithms in the market. These machine learning algorithms are implemented in python.
Machine Learning Algorithm Types:
List of Machine Learning Algorithms is of a never-ending one.
There are 3 types of ML algorithms:
- 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.
- Regression: To foresee and predict the result of a given input where the output is in the form of real values, machine learning algorithms operating on regression are used. Examples include real-valued labels denoting the amount of rainfall, the height of a person.
- Ensembling: A collaborative approach wherein the predictions of many weak ML models are taken into consideration to predict on a new output.
2. Unsupervised learning:
Unsupervised learning makes use of only the input variables, it doesn’t take into account the outputs of the corresponding inputs. It uses unlabeled training data to deploy the structured model.
Machine Learning Algorithms Classification in Unsupervised is as follows,
- Association: Used to predict the interesting relations and probability of co-occurrence between variables in a large collection. It is widely used in the market-basket analysis. For example, if a customer purchases a notebook, he is 80% likely to also purchase a pen.
- Clustering: Clustering is all about grouping things. Samples that are similar are grouped in the same clusters, these groups should in contrast to each other to the widest extent possible. For example, it can be used to characterize & discover customer segments for marketing purposes.
- Dimensionality Reduction: Minimizing the number of input variables of a dataset while guaranteeing that significant data is still passed on. For example, a characterization problem that heavily depends on both humidity and rainfall can be broken down into just one underlying feature. Hence, we can reduce the number of features in the problems in this category.
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.
Supervised learning algorithms:
- Linear Regression:
Linear Regression is used everywhere from the stock market to research teams. Some use cases are:
- weather data analysis.
- In market research studies and customer survey results analysis.
- Studying engine performance.
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.
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.
- 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.
Linear regression works on continuous values while logistic regression works on discrete values.
Logistic regression is best suited for binary classification i.e. target variable is either 0 or 1. For example, in predicting whether an event will occur or not, the event that it occurs is classified as 1. In predicting whether a coin toss result would be head or tales, the head instances are denoted as 1).
In logistic regression, the output is in the form of probabilities of the default class. As it depends on probability, the output lies in the range 0-1. The output value is generated by applying an activation/transformation function to x-value, using the logistic mentioned above.
3. Naive Bayes Classification:
This algorithm works on Bayes Theorem. Used to calculate the probability that an event will occur, given that another event has already occurred.
To calculate the probability of an outcome given the value of some variable, that is
P(x|y) = (P(y|x) * P(x)) / P(y)
- We are trying to find the probability of event x, given the event y is true. Event y is also termed as evidence.
- P(x) is the priori of x, i.e., probability of an event before evidence is seen. The evidence is an attribute value of an unknown instance, here y.
- P(x|y) is a posteriori probability of y, i.e. probability of event after evidence is seen.
This algorithm is named ‘Naive’ as it assumes that all the variables are independent of each other.