DEV Community

Cover image for Introduction to Machine Learning and different ML Algorithms
Afroz Chakure
Afroz Chakure

Posted on • Updated on

Introduction to Machine Learning and different ML Algorithms

What is Machine Learning?

Machine learning is a sub-field of artificial intelligence. Its goal is to enable computers to learn on their own.

A machine's learning algorithm enables it to identify patterns in observed data, build models that explain the world, and predict things without having explicit pre-programmed rules and models.


Traditional Programming vs Machine Learning style=
Fig. 1 - Traditional Programming vs Machine Learning

The term Machine Learning was coined by Arthur Samuel in 1959, an American pioneer in the field of computer gaming and artificial intelligence and stated that

"It gives computers the ability to learn without being explicitly programmed".

And in 1997, Tom Mitchell gave a "well-posed" mathematical and relational definition that

"A computer program is said to learn from experience E with respect to some task T and some performance measure P, if its performance on T, as measured by P, improves with experience E."

Different types of Machine Learning Algorithms :

  1. Supervised Learning.
  2. Unsupervised Learning.
  3. Reinforcement Learning.

Fig. 2 - Unsupervised Learning

1. Supervised Learning :

In supervised learning, we are given a data set and already know what our correct output should look like, having the idea that there is a relationship between the input and output.

Two types of Supervised Learning :

  1. Regression - Estimate continuous values (Real valued output)
  2. Classification - Identify a unique class (Discrete values, Boolean or Categories)

1.1 Regression :

Regression models a target prediction value based on independent variables. It is mostly used for finding out the relationship between variables and forecasting. Regression can be used to estimate/ predict continuous values (Real valued output).

For example : Given a picture of a person, we have to predict the age on the basis of the given picture .

1.2 Classification :

Classification means to group the output into a class. If the data set is discrete or categorical then it is a classification problem.

For example : Given data about the sizes of houses in the real estate market, making our output about whether the house "sells for more or less than the asking price" i.e. Classifying houses into two discrete categories.


Fig. 3 - Unsupervised Learning

2. Unsupervised Learning :

It allows us to approach problems with little or no idea about what our results look like. We can derive structure from data where we don't necessarily know the effect of the variables.

We can derive this structure by clustering the data based on relationships among the variables in the data.

2.1. Clustering :

Clustering is the task of grouping a set of objects in such a way that objects in the same group (called a cluster) are more similar (in some sense) to each other than to those in other groups (clusters).

For example: Take a collection of 1,000,000 different genes, and find a way to automatically group these genes into groups that are somehow similar or related by different variables, such as lifespan, location, roles, and so on.


Fig. 4 - Unsupervised Learning

3. Reinforcement Learning :

Reinforcement Learning is about taking suitable actions to maximize reward in a particular situation. It is employed by various software and machines to find the best possible behavior or path to take in a specific situation.


Fig. 5 - Reinforcement Learning

Reinforcement learning differs from supervised learning in a way that in supervised learning the training data has the answer key with it, so the model is trained with the correct answer itself whereas in reinforcement learning, there is no answer and the reinforcement agent
decides what to do in order to perform the given task. In the absence of training data set, it is bound to learn from its experience.

Applications of Machine Learning :

  1. Virtual Personal Assistants.
  2. Predictions while commuting.
  3. Videos Surveillance.
  4. Social Media Services.
  5. Email Spam and Malware Filtering.
  6. Online Customer Support.
  7. Search Engine Result Refining.
  8. Product Recommendations.
  9. Online Fraud Detection.

Fig. 6 - Some Applications of Machine Learning

Top comments (0)