Skip to main content

dataset

dataset(
@data ## llll (required)
) -> llll

Generates a llll representation of a dataset, given a list of numeric data points. In bellplay~, datasets serve as numeric data containers for a variety of machine learning tasks, including:

  • Dimensionality reduction: See umap, pca, and transform functions.
  • Data scaling: See normscaler, stdscaler, robustscaler, and transform functions.
  • Regression: See mlp, knn, fit, and predict functions.
  • Classification: See mlp, knn, kmeans, fit, predict, and labelset functions.
  • Efficient search: See kdtree function.

Note that @data must be a llll of depth 2, where each sublist has the same number of elements (i.e., dimensions)


Arguments

  • @data [llll]: Data points as a rectangular matrix. (required)

Output

Dataset object [llll]


Usage

$dataset = dataset(
for $i in 1...100 collect [for $j in 1...5 collect randn()] ## dummy data
);
$samps = getitems($dataset, 1...3); ## get the first 3 items in dataset

print($samps, "Items:")