# Deep Learning with Time Series and Sequence Data

Create and train networks for time series classification, regression, and forecasting tasks. Train long short-term memory (LSTM) networks for sequence-to-one or sequence-to-label classification and regression problems. You can train LSTM networks on text data using word embedding layers (requires Text Analytics Toolbox™) or convolutional neural networks on audio data using spectrograms (requires Audio Toolbox™).

## Apps

Deep Network Designer | Design, visualize, and train deep learning networks |

## Functions

## Blocks

## Properties

ConfusionMatrixChart Properties | Confusion matrix chart appearance and behavior |

## Examples and How To

### Sequences and Time Series

**Sequence Classification Using Deep Learning**

This example shows how to classify sequence data using a long short-term memory (LSTM) network.**Sequence Classification Using 1-D Convolutions**

This example shows how to classify sequence data using a 1-D convolutional neural network.**Sequence-to-Sequence Classification Using Deep Learning**

This example shows how to classify each time step of sequence data using a long short-term memory (LSTM) network.**Sequence-to-Sequence Regression Using Deep Learning**

This example shows how to predict the remaining useful life (RUL) of engines by using deep learning.**Sequence-to-One Regression Using Deep Learning**

This example shows how to predict the frequency of a waveform using a long short-term memory (LSTM) neural network.**Time Series Forecasting Using Deep Learning**

This example shows how to forecast time series data using a long short-term memory (LSTM) network.**Time Series Anomaly Detection Using Deep Learning**

This example shows how to detect anomalies in sequence or time series data.**Classify Videos Using Deep Learning**

This example shows how to create a network for video classification by combining a pretrained image classification model and an LSTM network.**Classify Videos Using Deep Learning with Custom Training Loop**

This example shows how to create a network for video classification by combining a pretrained image classification model and a sequence classification network.**Speech Command Recognition Using Deep Learning**

This example shows how to train a deep learning model that detects the presence of speech commands in audio.**Image Captioning Using Attention**

This example shows how to train a deep learning model for image captioning using attention.**Train Network Using Custom Mini-Batch Datastore for Sequence Data**

This example shows how to train a deep learning network on out-of-memory sequence data using a custom mini-batch datastore.**Visualize Activations of LSTM Network**

This example shows how to investigate and visualize the features learned by LSTM networks by extracting the activations.**Sequence Classification Using Inverse-Frequency Class Weights**

This example shows how to classify sequences with a 1-D convolutional neural network using class weights that are inversely proportional to the frequency of the respective classes.**Sequence-to-Sequence Classification Using 1-D Convolutions**

This example shows how to classify each time step of sequence data using a generic temporal convolutional network (TCN).**Chemical Process Fault Detection Using Deep Learning**

Use simulation data to train a neural network than can detect faults in a chemical process.**Build Networks with Deep Network Designer**

Interactively build and edit deep learning networks in Deep Network Designer.**Create Simple Sequence Classification Network Using Deep Network Designer**

This example shows how to create a simple long short-term memory (LSTM) classification network using Deep Network Designer.**Predict and Update Network State in Simulink**

This example shows how to predict responses for a trained recurrent neural network in Simulink® by using the`Stateful Predict`

block.**Classify and Update Network State in Simulink**

This example shows how to classify data for a trained recurrent neural network in Simulink® by using the`Stateful Classify`

block.**Predict Battery State of Charge Using Deep Learning**

This example shows how to train a neural network to predict the state of charge of a battery by using deep learning.**Physical System Modeling Using LSTM Network in Simulink**

This example shows how to create a reduced order model (ROM) to replace a Simscape component in a Simulink® model by training a long short-term memory (LSTM) neural network.

## Concepts

**Long Short-Term Memory Networks**Learn about long short-term memory (LSTM) networks.

**List of Deep Learning Layers**Discover all the deep learning layers in MATLAB

^{®}.**Datastores for Deep Learning**Learn how to use datastores in deep learning applications.

**Deep Learning in MATLAB**Discover deep learning capabilities in MATLAB using convolutional neural networks for classification and regression, including pretrained networks and transfer learning, and training on GPUs, CPUs, clusters, and clouds.

**Deep Learning Tips and Tricks**Learn how to improve the accuracy of deep learning networks.

**Data Sets for Deep Learning**Discover data sets for various deep learning tasks.