Description Usage Arguments Value Examples
Evolve a population of parameter values
1 2 3 4 | seibert.evolve(params, values, probs = NULL, rescaler = c("rescale_none",
"rescale", "squish"), seed = NULL, validate = TRUE,
breedargs = list(breed.use1 = 0.41, breed.use2 = 0.41, breed.rinterpolate =
0.16, breed.mutate = 0.02))
|
params |
A |
values |
A |
probs |
A vector of probabilities with which to weight sampling of the breeding couples. Can be NULL, indicating there is no preference. |
rescaler |
Pass TRUE to rescale |
seed |
Seed for random operations |
validate |
Pass FALSE to skip validation (may be faster). |
breedargs |
Passed to seibert.breed; may be overridden by parameters. |
A list
of parameters with identical names to params
and values
1 2 3 4 5 6 7 8 9 10 11 12 13 | params <- list(param.discrete(c('heads', 'tails')),
param.real(c(0, 1)),
beersdrank=param.normal.int(5, 1),
taxes=param.fixed(TRUE))
values <- lapply(params, initial.value, n=10)
seibert.evolve(params, values)
# 'select' for heads
for(i in 1:10) {
values <- seibert.evolve(params, values,
ifelse(values[[1]]=="heads", 0.6, 0.4))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.