scale_attraction | R Documentation |
Modifies a vector of attraction values based on the deterministic nature of the choice. When choice determinism is positive, the best choice becomes relatively more attractive.
scale_attraction(attractions, choice_determinism)
attractions |
a vector of numerics representing attractiveness of various options |
choice_determinism |
numeric. At 0, choice probability is directly proportional to attraction. When negative, the choice becomes more random. When positive, better options become relatively more attractive. Absolute values of 1 approach full randomness/determinism |
## Not run: x <- seq(0,10,0.1) plot(x, scale_attraction(x, 0)) lines(x, scale_attraction(x, 0.2), col = "green") lines(x, scale_attraction(x, 0.5), col = "yellow") lines(x, scale_attraction(x, 0.9), col = "red") lines(x, scale_attraction(x, -0.2), col = "green") lines(x, scale_attraction(x, -0.5), col = "yellow") lines(x, scale_attraction(x, -0.9), col = "red") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.