Calculates the optimum values for number of batches or size of the batches. If you need to do several batches it can be better to distribute it evenly and add replicates.

## Usage

optimum_batches(size_data, size_subset)

optimum_subset(size_data, batches)

sizes_batches(size_data, size_subset, batches)

## Arguments

size_data

A numeric value of the number of samples to use.

size_subset

Numeric value of the number of sample per batch.

batches

A numeric value of the number of batches.

## Value

optimum_batches

A numeric value with the number of batches to use.

optimum_subset

A numeric value with the maximum number of samples per batch of the data.

sizes_batches

A numeric vector with the number of samples in each batch.

## Examples

size_data <- 50
size_batch <- 24
(batches <- optimum_batches(size_data, size_batch))
#> [1] 3
# So now the best number of samples for each batch is less than the available
(size <- optimum_subset(size_data, batches))
#> [1] 17
# The distribution of samples per batch
sizes_batches(size_data, size, batches)
#> [1] 17 17 16