# Machine Learning Models Explained

![Source: becominghuman.ai](https://2327526407-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LvBP1svpACTB1R1x_U4%2F-LvI8vNq_N7u3RWVAPLk%2F-LvJChz-OpOFlobU-jSo%2FUntitled-1.jpg?alt=media\&token=6fc5ef91-1916-404a-b5cc-7e73617082d1)

## What Is a model?

The output from model training may be used for inference, which means making predictions on new data. A model is a distilled representation of what a machine learning system has learned.  Machine learning models are akin to mathematical functions -- they take a request in the form of input data, make a prediction on that input data, and then serve a response.

In [**supervised**](https://machine-learning.paperspace.com/supervised-unsupervised-and-reinforcement-learning#supervised) and [**unsupervised**](https://machine-learning.paperspace.com/supervised-unsupervised-and-reinforcement-learning#unsupervised) machine learning, the model describes the signal in the noise or the pattern detected from the training data.&#x20;

In [**reinforcement learning**](https://machine-learning.paperspace.com/supervised-unsupervised-and-reinforcement-learning#reinforcement-learning), the model describes the best possible course of action given a specific situation.

The final set of trainable parameters (the information the model contains) depends on the specific type of model -- in deep neural networks, a model is the final state of the trained [weights](https://machine-learning.paperspace.com/wiki/weights-and-biases) of the network, in regression it contains coefficients, and in decision trees it contains the split locations.

## Algorithms

#### Neural Networks

There are many different types of models such as [GANs](https://machine-learning.paperspace.com/wiki/generative-adversarial-network-gan), [LSTMs](https://machine-learning.paperspace.com/wiki/long-short-term-memory-lstm) & [RNNs](https://machine-learning.paperspace.com/wiki/recurrent-neural-network-rnn), [CNNs](https://machine-learning.paperspace.com/wiki/convolutional-neural-network-cnn), Autoencoders, and [Deep Reinforcement Learning](https://machine-learning.paperspace.com/supervised-unsupervised-and-reinforcement-learning#reinforcement-learning) models. Deep neural networks are used for object detection, speech recognition and synthesis, image processing, style transfer, and machine translation, and can replace most classical machine learning algorithms (see below). This modern method can learn extremely complex patterns and is especially successful on unstructured datasets such as images, video, and audio. &#x20;

#### **Ensemble Methods**

Ensemble techniques like [Random Forests](https://machine-learning.paperspace.com/wiki/random-forest) and [Gradient Boosting](https://machine-learning.paperspace.com/wiki/gradient-boosting) can achieve superior performance over classical machine learning techniques by aggregating weaker models and learning non-linear relationships. &#x20;

#### Classical Machine Learning&#x20;

Popular ML algorithms include: linear regression, logistic regression, SVMs, nearest neighbor, decision trees, PCA, naive Bayes classifier, and k-means clustering. Classical machine learning algorithms are used for a wide range of applications.&#x20;

## Types of Supervised Learning Models

### Classification <a href="#binary-classification-model" id="binary-classification-model"></a>

Deep neural networks, classification trees (ensembles), and logistic regression (classical machine learning) are all used to perform regression tasks.

**Popular use cases:**

&#x20;Spam filtering, language detection, a search of similar documents, sentiment analysis, recognition of handwritten characters, and fraud detection.

**Binary Classification Goal:** Predict a binary outcome.

#### Examples <a href="#examples-of-binary-classification-problems" id="examples-of-binary-classification-problems"></a>

* "Is this email spam or not spam?"
* "Is this user fraudulent or not?"
* "Is this picture a cat or not?"

**Multi-class Classification Goal:** Predict one out of two or more discrete outcomes.

#### Examples <a href="#examples-of-multiclass-problems" id="examples-of-multiclass-problems"></a>

* "Which genre does this user prefer?"
* "Is this mail is spam or important or a promotion?"
* "Is this picture a cat or a dog or a fox?"

### Regression <a href="#regression-model" id="regression-model"></a>

Deep neural networks, regression trees (ensembles), and linear regression (classical machine learning) are all used to perform regression tasks.&#x20;

**Popular use cases:**&#x20;Forecasting stock prices, predicting sales volume, etc.

**Goal:** Predict a numeric value.&#x20;

#### Examples <a href="#examples-of-regression-problems" id="examples-of-regression-problems"></a>

* "What will the temperature be in NYC tomorrow?"
* "What is the price of house in this specific neighborhood?"

## Types of Unsupervised Learning models

### Neural Networks

Deep neural network architectures such as autoencoders and GANs can be applied to a wide variety of unsupervised learning problems.&#x20;

### Clustering (Classical ML) <a href="#regression-model" id="regression-model"></a>

**Popular use cases:**For customer segmentation, labeling data, detecting anomalous behavior, etc.

**Popular algorithms:** K-means, Mean-Shift, DBSCAN

**Goal:** Group similar things together.&#x20;

#### Examples <a href="#examples-of-regression-problems" id="examples-of-regression-problems"></a>

* "Cluster different news articles into different types of news"

### Association Rule (Classical ML)

**Popular use cases:**&#x20;Helping stores cross-sell products, uncovering how items are related or complementary, and understanding which symptoms are likely to co-occur in a patient (comorbidity).

**Popular algorithms:** Apriori, Euclat, FP-growth

**Goal:** Infer patterns (associations) in data.&#x20;

#### Examples <a href="#examples-of-regression-problems" id="examples-of-regression-problems"></a>

* "If you bought a phone, you are likely to buy a phone case."

### Dimensionality Reduction (Classical ML)&#x20;

**Popular use-cases:** Recommender systems, topic modeling, modeling semantics, document search, face recognition, and anomaly detection.&#x20;

**Popular algorithms:** Principal Component Analysis (PCA), Singular Value Decomposition (SVD), Latent Dirichlet Allocation (LDA), Latent Semantic Analysis (LSA, pLSA, GLSA), and t-SNE.&#x20;

**Goal:** To generalize data and distill the relevant information.&#x20;

#### Examples <a href="#examples-of-regression-problems" id="examples-of-regression-problems"></a>

* "Intelligently group and combine similar features into higher-level abstractions."

## Types of Reinforcement Learning Models

**Popular use-cases:** Robotic motion, recommender systems, autonomous transport, text mining, trade execution in finance, and optimization for treatment policies in healthcare.

**Popular algorithms:** Q-Learning, SARSA, DQN, A3C

**Goal:** Perform complex tasks without training data.

#### Examples <a href="#examples-of-regression-problems" id="examples-of-regression-problems"></a>

* "Robotic motion control learned by trial and error."

{% hint style="info" %}
**Imitation Learning** is an exciting area in Reinforcement Learning, designed to overcome some of the challenges or shortcomings inherent in Reinforcement Learning techniques. These techniques are often used together.&#x20;
{% endhint %}
