admm.tv {ADMM} | R Documentation |

## Total Variation Minimization

### Description

1-dimensional total variation minimization - also known as signal denoising - is to solve the following

`\textrm{min}_x ~ \frac{1}{2}\|x-b\|_2^2 + \lambda \sum_i |x_{i+1}-x_i|`

for a given signal `b`

.
The implementation is borrowed from Stephen Boyd's
MATLAB code.

### Usage

```
admm.tv(
b,
lambda = 1,
xinit = NA,
rho = 1,
alpha = 1,
abstol = 1e-04,
reltol = 0.01,
maxiter = 1000
)
```

### Arguments

`b` |
a length- |

`lambda` |
regularization parameter |

`xinit` |
a length- |

`rho` |
an augmented Lagrangian parameter |

`alpha` |
an overrelaxation parameter in |

`abstol` |
absolute tolerance stopping criterion |

`reltol` |
relative tolerance stopping criterion |

`maxiter` |
maximum number of iterations |

### Value

a named list containing

- x
a length-

`m`

solution vector- history
dataframe recording iteration numerics. See the section for more details.

### Iteration History

When you run the algorithm, output returns not only the solution, but also the iteration history recording following fields over iterates,

- objval
object (cost) function value

- r_norm
norm of primal residual

- s_norm
norm of dual residual

- eps_pri
feasibility tolerance for primal feasibility condition

- eps_dual
feasibility tolerance for dual feasibility condition

In accordance with the paper, iteration stops when both `r_norm`

and `s_norm`

values
become smaller than `eps_pri`

and `eps_dual`

, respectively.

### Examples

```
## generate sample data
x1 = as.vector(sin(1:100)+0.1*rnorm(100))
x2 = as.vector(cos(1:100)+0.1*rnorm(100)+5)
x3 = as.vector(sin(1:100)+0.1*rnorm(100)+2.5)
xsignal = c(x1,x2,x3)
## run example
output = admm.tv(xsignal)
## visualize
opar <- par(no.readonly=TRUE)
plot(1:300, xsignal, type="l", main="TV Regularization")
lines(1:300, output$x, col="red", lwd=2)
par(opar)
```

*ADMM*version 0.3.3 Index]