R/shuffle_samples.R
complete_random_shuffling.Rd
This function was just added to test early on the functionality of optimize_design() to accept a permutation vector rather than a list with src and dst indices.
complete_random_shuffling(batch_container, ...)
The batch-container.
Other params that are passed to a generic shuffling function (like the iteration number).
A random permutation of the sample assignment in the container.
data("invivo_study_samples")
bc <- BatchContainer$new(
dimensions = c("plate" = 2, "column" = 5, "row" = 6)
)
scoring_f <- osat_score_generator("plate", "Sex")
bc <- optimize_design(
bc, scoring = scoring_f, invivo_study_samples,
max_iter = 100,
shuffle_proposal_func = complete_random_shuffling
)
#> Warning: NAs in features / batch columns; they will be excluded from scoring
#> Checking variances of 1-dim. score vector.
#> ... (142.337) - OK
#> Initial score: 182.5
#> Achieved score: 42.5 at iteration 1
#> Achieved score: 0.5 at iteration 2