Products & Services Solutions Academia Support User Community Company


newlvq

Purpose

Create learning vector quantization network

Syntax

Description

Learning vector quantization (LVQ) networks are used to solve classification problems.

net = newlvq(P,S1,PC,LR,LF) takes these inputs,

P
R x Q matrix of Q input vectors with R elements
S1
Number of hidden neurons
PC
S2 element vector of typical class percentages
LR
Learning rate (default = 0.01)
LF
Learning function (default = 'learnlv2')

and returns a new LVQ network.

The learning function LF can be learnlv1 or learnlv2.

Properties

newlvq creates a two-layer network. The first layer uses the compet transfer function and calculates weighted inputs with negdist and net input with netsum. The second layer has purelin neurons, and calculates weighted input with dotprod and net inputs with netsum. Neither layer has biases.

First-layer weights are initialized with midpoint. The second-layer weights are set so that each output neuron i has unit weights coming to it from PC(i) percent of the hidden neurons.

Adaption and training are done with trains and trainr, which both update the first-layer weights with the specified learning functions.

Examples

The input vectors P and target classes Tc below define a classification problem to be solved by an LVQ network.

The target classes Tc are converted to target vectors T. Then an LVQ network is created (with inputs P, four hidden neurons, and class percentages of 0.6 and 0.4), and is trained.

The resulting network can be tested.

See Also

sim, init, adapt, train, trains, trainr, learnlv1, learnlv2


 Provide feedback about this page 

Previous page newlrn newnarx Next page

Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS