Denoises a sequence of observations by solving the univariate total variation denoising optimization problem at a given regularization level.
Details
This function minimizes the univariate total variation denoising (also called fused lasso) criterion squares criterion $$ \frac{1}{2} \sum_{i=1}^n (y_i - \theta_i)^2 + \lambda \sum_{i=1}^{n-1} |\theta_{i+1} - \theta_i|, $$ over \(\theta\). This is a special structured convex optimization problem which can be solved in linear time (\(O(n)\) operations) using algorithms based on dynamic programming (Viterbi) or taut string methods. The current function implements a highly-efficient dynamic programming method developed by Johnson (2013).