This package provides an efficient solution for $\ell_0$ Trend Filtering, avoiding the traditional methods of using Lagrange duality or ADMM algorithms. It employ a splicing approach that minimizes L0-regularized sparse approximation by transforming the $\ell_0$ Trend Filtering problem.
L0TFinv can be installed from Github as follows:
if(!require(devtools)) install.packages('devtools')
library(devtools)
install_github("C2S2-HF/InverseL0TF", repos = NULL, type = "source")
Alternatively, you can run the following code in R to install L0TFinv after downloading L0TFinv_0.1.0.tar.gz.
install.packages("Your_download_path/L0TFinv_0.1.0.tar.gz", repos = NULL, type = "source")
For a tutorial, please refer to L0TFinv's Vignette.