Description Usage Arguments Value Author(s) Examples
Minimizer for local models, described in article section 2.3 "Picking the optimal model"
1 | pick.best.index(err)
|
err |
Vector of errors to minimize. |
Integer index of the minimal error.
Toby Dylan Hocking
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | stopifnot(pick.best.index(rep(0,100))==50)
err <- rep(1,100)
err[5] <- 0
stopifnot(pick.best.index(err)==5)
## should pick the middle
err <- rep(1,100)
err[40:60] <- 0
stopifnot(pick.best.index(err)==50)
## should pick the biggest
err <- rep(1,100)
err[1:60] <- 0
stopifnot(pick.best.index(err)==60)
## should pick the smallest
err <- rep(1,100)
err[50:100] <- 0
stopifnot(pick.best.index(err)==50)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.