LabelSet
An associative container for identifiers and labels
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
We could use this LabelSet in combination with the DataSet depicted below to form the basis of an instrumental classification system.
DataSet
Some Caveats to Remember
- Identifiers are unique. You cannot have the same identifier twice in a single LabelSet.
- 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.