Main Content

Pattern Recognition

Train a neural network to generalize from example inputs and their classes, train autoencoders


Neural Net Pattern RecognitionSolve pattern recognition problem using two-layer feed-forward networks


AutoencoderAutoencoder class


expand all

nprtoolNeural Net Pattern Recognition tool
viewView shallow neural network
trainAutoencoderTrain an autoencoder
trainSoftmaxLayerTrain a softmax layer for classification
decodeDecode encoded data
encodeEncode input data
predictReconstruct the inputs using trained autoencoder
stackStack encoders from several autoencoders together
networkConvert Autoencoder object into network object
patternnetGenerate pattern recognition network
lvqnetLearning vector quantization neural network
trainTrain shallow neural network
trainlmLevenberg-Marquardt backpropagation
trainbrBayesian regularization backpropagation
trainscgScaled conjugate gradient backpropagation
trainrpResilient backpropagation
mseMean squared normalized error performance function
rocReceiver operating characteristic
plotconfusionPlot classification confusion matrix
ploterrhistPlot error histogram
plotperformPlot network performance
plotregressionPlot linear regression
plotrocPlot receiver operating characteristic
plottrainstatePlot training state values
crossentropyNeural network performance
genFunctionGenerate MATLAB function for simulating shallow neural network

Examples and How To

Basic Design

Classify Patterns with a Shallow Neural Network

Use a neural network for classification.

Deploy Shallow Neural Network Functions

Simulate and deploy trained shallow neural networks using MATLAB® tools.

Deploy Training of Shallow Neural Networks

Learn how to deploy training of shallow neural networks.

Training Scalability and Efficiency

Shallow Neural Networks with Parallel and GPU Computing

Use parallel and distributed computing to speed up neural network training and simulation and handle large data.

Automatically Save Checkpoints During Neural Network Training

Save intermediate results to protect the value of long training runs.

Optimal Solutions

Choose Neural Network Input-Output Processing Functions

Preprocess inputs and targets for more efficient training.

Configure Shallow Neural Network Inputs and Outputs

Learn how to manually configure the network before training using the configure function.

Divide Data for Optimal Neural Network Training

Use functions to divide the data into training, validation, and test sets.

Choose a Multilayer Neural Network Training Function

Comparison of training algorithms on different problem types.

Improve Shallow Neural Network Generalization and Avoid Overfitting

Learn methods to improve generalization and prevent overfitting.

Train Neural Networks with Error Weights

Learn how to use error weighting when training neural networks.

Normalize Errors of Multiple Outputs

Learn how to fit output elements with different ranges of values.


Crab Classification

This example illustrates using a neural network as a classifier to identify the sex of crabs from physical dimensions of the crab.

Wine Classification

This example illustrates how a pattern recognition neural network can classify wines by winery based on its chemical characteristics.

Cancer Detection

This example shows how to train a neural network to detect cancer using mass spectrometry data on protein profiles.

Character Recognition

This example illustrates how to train a neural network to perform simple character recognition.


Train Stacked Autoencoders for Image Classification

This example shows how to train stacked autoencoders to classify images of digits.


Workflow for Neural Network Design

Learn the primary steps in a neural network design process.

Four Levels of Neural Network Design

Learn the different levels of using neural network functionality.

Multilayer Shallow Neural Networks and Backpropagation Training

Workflow for designing a multilayer shallow feedforward neural network for function fitting and pattern recognition.

Multilayer Shallow Neural Network Architecture

Learn the architecture of a multilayer shallow neural network.

Understanding Shallow Network Data Structures

Learn how the format of input data structures affects the simulation of networks.

Sample Data Sets for Shallow Neural Networks

List of sample data sets to use when experimenting with shallow neural networks.

Neural Network Object Properties

Learn properties that define the basic features of a network.

Neural Network Subobject Properties

Learn properties that define network details such as inputs, layers, outputs, targets, biases, and weights.