The LabelSet supports building a collection of connected labels and identifiers. The interface for doing this is similar to DataSet, only that instead of providing an identifier and some data, you provide an identifier and a symbol (which could be a human-readable string, such as “oboe” for example). Because a DataSet and a LabelSet can share identifiers, it allows us to create higher-level connections between the identifiers of stored in each one. This is an important part of building, for example, classification workflows with neural networks or for inferring the results of clustering such as from KMeans.

To illustrate this, a LabelSet is depicted below:

LabelSet

Identifier
Label
1
trombone
2
oboe
3
oboe
4
trombone
5
trombone

We could use this LabelSet in combination with the DataSet depicted below to form the basis of an instrumental classification system.

DataSet

Identifier
Data
1
132.11
323.30
424.44
2
0.01
1.32
3.14
3
2.11
1.23
0.84
4
233.30
400.20
98.30
5
244.70
89.20
800.00

Some Caveats to Remember

  1. Identifiers are unique. You cannot have the same identifier twice in a single LabelSet.
  2. Identifiers and labels are symbols. Even if you use a number for either of these, they will be internally represented as a “string” and returned to you as such. This means using fromsymbol in Max, for example, if you want the identifier or label to be converted to an actual number.
Last modified: Tue Aug 23 14 by James Bradbury
Edit File on GitHub