# somfwd

## Purpose

Forward propagation through a Self-Organising Map.

## Synopsis

    d2 = somfwd(net, x)

## Description

`d2 = somfwd(net, x)` propagates the data matrix `x` through a SOM `net`, returning the squared distance matrix `d2` with dimension `nin` by `num_nodes`. The $i$th row represents the squared Euclidean distance to each of the nodes of the SOM.

`[d2, win_nodes] = somfwd(net, x)` also returns the indices of the winning nodes for each pattern.

## Example

The following code fragment creates a SOM with a $5times 5$ map for an 8-dimensional data space. It then applies the test data to the map.

    net = som(8, [5, 5]);
    [d2, wn] = somfwd(net, test_data);

## See Also

`som`, `somtrain`

Pages: Index

Copyright (c) Ian T Nabney (1996-9)