Skip to content

dsryu0822/L1TrendFiltering.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

L1TrendFiltering.jl

A julia implementation for l1 trend filtering. It's just a translation of original matlab code, but something minor has been changed and readability is improved.

Usage

  • This package includes a dataset snp500 as a vector.
  • The function l1tf returns the result L1tf object. L1tf has two properties:
    • x: Vector{T}, output of $l_{1}$ trend filtering.
    • solved: Bool, if the solution is converged, then true.

In this package, l1tf allows changing other parameters, for instance, linesearch parameters $\alpha$ and $\beta$.

Example

using L1TrendFiltering
using Plots, CSV, DataFrames

y = snp500
result = l1tf(y, 50, verbose = true)
x = result.x

plot(ylabel = "log(price)")
plot!(y, label = "S&P500")
plot!(x, label = "l1tf")

snp

About

A julia implementation for l1 trend filtering.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages