# Machine Learning Models Explained

![Source: becominghuman.ai](/files/-LvJChz-OpOFlobU-jSo)

## 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**](/wiki/supervised-unsupervised-and-reinforcement-learning.md#supervised) and [**unsupervised**](/wiki/supervised-unsupervised-and-reinforcement-learning.md#unsupervised) machine learning, the model describes the signal in the noise or the pattern detected from the training data.&#x20;

In [**reinforcement learning**](/wiki/supervised-unsupervised-and-reinforcement-learning.md#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](/wiki/weights-and-biases.md) 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](/wiki/generative-adversarial-network-gan.md), [LSTMs](/wiki/long-short-term-memory-lstm.md) & [RNNs](/wiki/recurrent-neural-network-rnn.md), [CNNs](/wiki/convolutional-neural-network-cnn.md), Autoencoders, and [Deep Reinforcement Learning](/wiki/supervised-unsupervised-and-reinforcement-learning.md#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](/wiki/random-forest.md) and [Gradient Boosting](/wiki/gradient-boosting.md) 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://machine-learning.paperspace.com/wiki/machine-learning-models-explained.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
