# ML.Algorithm Types

Machine Learning algorithms are used to extract patterns from given data to predict or draw inferences, these algorithms divided into three different types:

- Supervised learning
- Unsupervised learning
- Reinforcement learning

**Supervised
learning:-**

Here the machine is presented with example inputs and their desired outputs, and the goal is to learn a general rule that maps inputs to outputs. Example: we train the machine several images of different faces along with the correct labels for those faces, and the machine learns the patterns that relate face images to their labels.

Supervised tasks can be broadly of two groups:

**Classification**algorithms deals with assigning observations into discrete categories, such as a given patient have “Cancer” or “no Cancer”? or animal is “Cat” or “Dog” in binary classification.- And
**Regression**algorithm is to predict continuously-valued outputs. For example, predicting house prices or stock prices.

The difference between the two tasks is the fact that the dependent attribute is numerical for regression and categorical for classification.

Few popular supervised algorithms are:

- Linear regression for regression problems.
- Support vector machines for classification problems.
- Random forest for classification and regression problems.

**Unsupervised
learning:-**

In this machine learning, labels are not provided, leaving it on its own to find underlying structure or distribution in the data in order to learn more about the data.

Unsupervised learning problems can
even be grouped into **clustering** and **association** problems.

**Clustering:**Here inputs are divided into groups. unlike in classification, the groups are not known beforehand, making this typically an unsupervised task, such as grouping customers by purchasing behavior.**Association**: An association rule learning problem is where we want to discover rules that describe large portions of your data, example in movie theaters 70% of people who buy popcorn and samosa, also buy a cool drink.

Few popular unsupervised algorithms:

- K-Means Clustering
- Apriori

**Reinforcement Learning:-**

A reinforcement learning algorithm / agent, learns by interacting with its environment. The agent receives rewards by performing correctly and penalties for performing incorrectly. The agent learns without intervention from a human by maximizing its reward and minimizing its penalty. So more and more the algorithm is played, the more it learns about the winning moves.

The reinforcement learning has the potential to be a groundbreaking technology as this learning makes machine innovative. Reinforcement learning applications today are got good popularity such as self-navigating vacuum cleaners, driverless cars…etc.

Few popular reinforcement algorithms:

- Q-learning : A policy based learning algorithm.
- TD (Temporal difference) algorithm takes the benefits of both the Monte Carlo method and dynamic programming (DP).
- Deep Adversarial Networks.