Learn R Programming

A Splicing Approach to $\ell_0$ Trend Filtering Using Inverse Transformation

Introduction

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.

R Package Installation

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")

Usage

For a tutorial, please refer to L0TFinv's Vignette.

Copy Link

Version

Install

install.packages('L0TFinv')

Version

0.1.0

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Tianhao Wang

Last Published

June 10th, 2025

Functions in L0TFinv (0.1.0)

DiffMat

Generate a difference matrix
SimuBlocksInv

Simulate Blocks Data
SimuWaveInv

Simulate Wave Data
L0TFinv.fix

The inverse L0 trend filtering with fixed change points
L0TFinv.opt

The inverse L0 trend filtering with optimal change points
TFmetrics

Print four metrics about change point detection results
XMat

Generate an artificial design matrix
print.L0TFinvfix

Print L0TFinvfix or L0TFinvopt object
L0TFinv-package

A package for L0-regularized sparse approximation
coef.L0TFinvfix

Extract estimated trends
solMat

Generate the inverse of the crossprod matrix
plot.L0TFinvfix

Plot L0TFinvfix or L0TFinvopt object