COBWEB Classification Model

From Emcap



by Ricard Marxer <>

Music Technology Group, Universitat Pompeu Fabra


Copyright (c) 2006-2008 All Rights Reserved.

Download Emerge 1.0 (GNU/Linux)

Download Emerge 1.0 (Windows)

What Is The Module?

It is in charge of classifying in an online, unsupervised and incremental manner a stream of incoming feature events. The module outputs representation events consisting of class assignments to each of the feature events received. The module also outputs changes to the representation space such as the creation of a new empty class, the creation of a new merged class or the removal of an existing class. The classification is done on the basis of the feature values and variances, the timings values are left unchanged and unclassified.

This module is often used between a feature extractor and an expectator which acts on symbolic data such as the Conceptual Boltzmann Machine by Marxer.

What Are The Inputs/Outputs?

The input to the model is a stream of feature events, each of them consisting of a timestamp a feature vector and their associated precisions. The output consists of a series of classes assigned to the input feature events. The classes assigned are the output of the process symbolization given as input a point in a continuous multidimensional space.

Since we are in an online and incremental configuration, the partitions of the space (the available symbols) are continuously dynamically changing and appearing, thus a complementary output informs of the partition changes. This notifications are in the form of three basic commands:

  • creation of a new empty set inside a superset
  • creation of a set inside a superset merging a group of subsets
  • removal of a set

This allows for connected modules to keep the interpretation of the symbols up to date and in synchrony with this module.

What Are The Parameters?

The parameters available to control this module is the acuity, which defines the maximal resolution of the partitions and the plotting option.

Usage: emem-cobweb [options]
 -h, --help            show this help message and exit
 -a ACUITY, --acuity=ACUITY
                       the value for the acuity [default: 0.085]
 -p, --plot            plot the representation module during exposure
                       [default: False]

What Are The System Requirements?


The package can be installed in several different ways, depending on your system. The easiest way is to install the setuptools package. On Debian based systems:

$ sudo apt-get install python-setuptools

and then just write the following:

$ sudo easy_install

If this method does not work correctly, one must install manually all the dependencies, and build the package himself. For the software to fully work you must have the following dependencies installed:

Then one must download the package here and run:

$ python build
$ sudo python install


A binary package has been made for ease of installation and use. To run, one must unzip the package somewhere and run the following executable from the command line:


How To Cite

 author = {Ricard Marxer and Piotr Holonowicz and Hendrik Purwins},
 title = {Dynamical Hierarchical Self-Organization of Harmonic, Motivic, and
 Pitch Categories},
 address = {Vancouver, Canada},
 booktitle = {Music, Brain and Cognition. Part 2: Models of Sound and
 Cognition, held at NIPS)},
 note = {(to appear)},
 year = {2007}

How To Use

$ emem-cobweb input_filename.fev output_filename.rev

Input File Format

A file containing one feature event per line. The events are of the form:


Output File Format

A file containing one representation event per line. The events are of two kind:

  • Assignemnts of classes to incoming feature events in the form
  • Changes to the representation space in the form:

Example Of Use

$ emem-cobweb test.fev test.rev