Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

patternnet

Pattern recognition network

Syntax

patternnet(hiddenSizes,trainFcn,performFcn)

Description

Pattern recognition networks are feedforward networks that can be trained to classify inputs according to target classes. The target data for pattern recognition networks should consist of vectors of all zero values except for a 1 in element i, where i is the class they are to represent.

patternnet(hiddenSizes,trainFcn,performFcn) takes these arguments,

hiddenSizes

Row vector of one or more hidden layer sizes (default = 10)

trainFcn

Training function (default = 'trainscg')

performFcnPerformance function (default = 'crossentropy')

and returns a pattern recognition neural network.

Examples

Pattern Recognition

This example shows how to design a pattern recognition network to classify iris flowers.

[x,t] = iris_dataset;
net = patternnet(10);
net = train(net,x,t);
view(net)
y = net(x);
perf = perform(net,t,y);
classes = vec2ind(y);

Introduced in R2010b

Was this topic helpful?