scoring_f: Scoring functions used for optimization. Each scoring function should receive a BatchContainer . This function should return a floating point score value for the assignment. This a list of functions. Upon assignment a single function will be automatically converted to a list In the later case each function is called.
has_samples: Returns TRUE if BatchContainer has samples.
has_samples_attr: Returns TRUE if BatchContainer has sample atrributes assigned.
n_locations: Returns number of locations in a BatchContainer.
n_dimensions: Returns number of dimensions in a BatchContainer. This field cannot be assigned.
dimension_names: character vector with dimension names. This field cannot be assigned.
samples: Samples in the batch container. When assigning data.frame should not have column named .sample_id column.
samples_attr: Extra attributes of samples. If set, this is included into BatchContainer$get_samples() output.
assignment: Sample assignment vector. Should contain NAs for empty locations.
Assigning this field is deprecated, please use `$move_samples()` instead.
locations_table: A table with available locations.
dimensions: A vector or list of dimensions. Every dimension should have a name. Could be an integer vector of dimensions or a named list. Every value of a list could be either dimension size or parameters for BatchContainerDimension$new() . Can be used as an alternative to passing locations_table.
exclude: data.frame with excluded locations of a container. Only used together with dimensions.
dst: integer vector of destination locations (the same length as src).
location_assignment: integer vector with location assignment. The length of the vector should match the number of locations, NA should be used for empty locations.
Returns
BatchContainer, invisibly
Method score()
Score current sample assignment,
Usage
BatchContainer$score(scoring)
Arguments
scoring: a function or a names list of scoring functions. Each function should return a numeric vector.
Returns
Returns a named vector of all scoring functions values.
Method copy()
Create an independent copy (clone) of a BatchContainer
a ggplot2::ggplot() object List of scoring functions. Tibble with batch container locations. Tibble with sample information and sample ids. Sample attributes, a data.table. Vector with assignment of sample ids to locations. Cached data.table with samples assignment. Validate sample assignment.