File Exchange

image thumbnail

GWR and GNG Classifier

version (111 KB) by fizzy

fizzy (view profile)

A Growing When Required and Growing Neural Gas classifier


Updated 22 Jun 2016

GitHub view license on GitHub

An extension for classification including 2 types of Neural Gas, the Growing When Required (GWR) and Growing Neural Gas (GNG). Based on (Konsoulas, 2013) see GNG_LICENSE - with a wrapper for the GNG and my own implementation of a GWR neural gas (Marsland et al., 2002) and a simple classifier as simplified version from what Parisi used see (Parisi, 2015).
Included there is a simple example of a classifier with 4 shapes (which is trivially classifiable with 4 nodes), to show how the gas constructs the topological description of a dataset.
Cite as:
Belmonte Klein, F., 2016. GWR and GNG Classifier - File Exchange - MATLAB Central. Plymouth University, Plymouth, England.

address = {Plymouth, England},
title = {{GWR} and {GNG} {Classifier} - {File} {Exchange} - {MATLAB} {Central}},
copyright = {MIT License Copyright (c) 2016 Frederico Belmonte Klein},
shorttitle = {{GWR} and {GNG} {Classifier}},
url = {},
abstract = {A Growing When Required and Growing Neural Gas classifier},
urldate = {2016-06-22},
publisher = {Plymouth University},
author = {Belmonte Klein, Frederico},
month = June,
year = {2016}


Konsoulas, I., 2013. Unsupervised Learning with Growing Neural Gas (GNG) Neural Network - File Exchange - MATLAB Central [WWW Document]. URL (accessed 6.22.16).

Marsland, S., Shapiro, J., Nehmzow, U., 2002. A self-organising network that grows when required. Neural Networks 15, 1041–1058.

Parisi, G.I., Weber, C., Wermter, S., 2015. Self-organizing neural integration of pose-motion features for human action recognition. Frontiers in Neurorobotics 9. doi:10.3389/fnbot.2015.00003

Comments and Ratings (3)

This code is very useful

Very useful extension of SOM algorithm with much better performance. Nicely written, easy to use. Thanks for sharing.


Updated references.

minor details about references, summary and title

Updated references.

Added important citation of Marsland 2002 paper that described the GWR neural gas.

MATLAB Release Compatibility
Created with R2015b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.

Learn About Live Editor