Skip to main content

labelset

labelset(
@labels ## list/symbol (required)
) -> llll

Generates a llll representation of a label object, given a list of labels. In bellplay~, labelsets serve as categorical data containers for a variety of classification tasks. See for instance the dataset, mlp, knn, kmeans, fit, predict functions.

Note that @labels must be a flat list of symbols, each of which is meant to be a label for a point in some other dataset (see dataset function), based on their index position.


Arguments

  • @labels [list/symbol]: List of data labels, as symbols. (required)

Output

Labelset object [llll]


Usage

$labelset = labelset(
for $i in 1...100 collect choose('foo' 'bar' 'baz') ## dummy data
);
$samps = getitems($labelset, 1...3); ## get the first 3 items in labelset

print($samps, "Items:")