mirror: Generates weights using mirror algorithm. Fulfills equality...

Description Usage Arguments Value Author(s) References Examples

Description

To project a vector u onto vector v we use the operation proj(u)_v = v * fracu*vv*v. We do this several times with an operation that looks like u * u

Usage

1
2
mirror(Amat, x0, n, verbose = FALSE, numjump = 20,
  includeInfeasible = FALSE)

Arguments

Amat

This is the matrix of the equality constraint coefficients

x0

An original solution to the constraints

n

Number of random solutions to output

verbose

Give verbose output describing the progress of the function

numjump

The number of jumps to scatter around the direction given by the difference from zero

includeInfeasible

TRUE to include all "bad" points in the output

Value

Gives back a matrix with 'n' columns corresponding to 'n' positive solutions to Ax = b. If includeInfeasible is TRUE then infeasible points will also be included in the output, so there will be some negatives. This is to be able to track the walk of mirror.

Author(s)

Mike Flynn <mflynn210@gmail.com>

References

Van Den Meershe, Karel, Karline Soetaert, and Dick Van Oevelen. "Xsample(): An R Function for Sampling Linear Inverse Problems." Journal of Statistical Software 30 (2009): 1–15. http://cran.cermin.lipi.go.id/web/packages/limSolve/vignettes/xsample.pdf

Examples

1
2
3
Amat <- matrix(1, ncol = 3, nrow = 1)
x0 <- c(.3, .3, .4)
mirror(Amat, x0, 1)

davidkane9/kmatching documentation built on May 15, 2019, 1:14 a.m.