pick.best.index: pick best index

Description Usage Arguments Value Author(s) Examples

Description

Minimizer for local models, described in article section 2.3 "Picking the optimal model"

Usage

1

Arguments

err

Vector of errors to minimize.

Value

Integer index of the minimal error.

Author(s)

Toby Dylan Hocking

Examples

 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)

tdhock/bams documentation built on May 31, 2019, 7:34 a.m.