make_buckets: map every sample to a bucket

View source: R/function_cv_bucket_maker.R

make_bucketsR Documentation

map every sample to a bucket

Description

takes training data and sorts it into buckets, one for each fold.

Usage

make_buckets(train.Y, folds)

Arguments

train.Y

numeric matrix, training data

folds

integer, number of buckets to build.

Value

named vector

Examples

some.mat <- matrix(1:20, nrow = 2)
colnames(some.mat) <- paste0("some.mat", 1:ncol(some.mat))
n.folds <- 5
mapped.buckets <- make_buckets(
  train.Y = some.mat
  , folds = n.folds
  )
table(mapped.buckets)

MarianSchoen/DTD documentation built on April 29, 2022, 1:59 p.m.