dikin_walk: Dikin Walk

Description Usage Arguments Value Examples

Description

This function implements the Dikin Walk using the Hessian of the Log barrier function. Note that a $r$ of 1 guarantees that the ellipsoid generated won't leave our polytope $K$ (see Theorems online)

Usage

1
2
dikin_walk(A, b, x0 = list(), points, r = 1, thin = 1, burn = 0,
  chains = 1)

Arguments

A

is the lhs of Ax <= b

b

is the rhs of Ax <= b

x0

is the starting point (a list of points)

points

is the number of points we want to sample

r

is the radius of the ellipsoid (1 by default)

thin

every thin-th point is stored

burn

the first burn points are deleted

chains

is the number of chains we run

Value

a list of chains of the sampled points, each chain being a matrix object with each column as a point

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
A <- rbind(c(1, 0), c(0, 1))
b <- c(1, 1)    
sampled_points <- dikin_walk(A = A, b = b, points = 10, x0 = list(c(0.5,0.5)))

## Not run: 
## note that this Ax <= b is different from Ax=b that the 
## user specifies for walkr (see transformation section in vignette) 
dikin_walk(A = A, b = b, x0, points = 100, 
           r = 1thin = 1, burn = 0, chains = 1) 

## End(Not run) 

walkr documentation built on June 29, 2019, 9:02 a.m.