You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I wanted to raise awareness of an error I have been getting with trend filtering. It looks like it could be an edge case of some kind. Here is a reproducible example:
`using Lasso, LinearAlgebra, Random
rng = Xoshiro(45);
n = 100;
y = rand(rng, n) .- 0.5;
f_fl = fit(FusedLasso, y, 0.5);
f_tf = fit(TrendFilter, y, 2, 0.5);
`
The trend filter fit results in the following error:
The error is generated regardless of the value of the order parameter. I have attached a plot of the data and the fused lasso coefficients.
In the next example, trend filtering dose work:
`fs = 250.0 # Sampling frequency in Hz
t = 0:1/fs:10 # 10 seconds of data
signal = sin.(2π1.0.t) + 0.5sin.(2π50.0.*t)
lambda = norm(signal, Inf)/2
fit_fl = fit(FusedLasso, signal, lambda);
fit_tf = fit(TrendFilter, signal, 2, lambda);
`
A plot of the results is attached.
I have been using trend filtering often and run into this indexing error ~1/4 of the time.
Cheers
Peter
(@v1.11) pkg> st Lasso
Status ~/.julia/environments/v1.11/Project.toml
[b4fcebef] Lasso v0.7.2
julia> versioninfo()
Julia Version 1.11.1
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
LLVM: libLLVM-16.0.6 (ORCJIT, goldmont)
The text was updated successfully, but these errors were encountered:
Hi,
I wanted to raise awareness of an error I have been getting with trend filtering. It looks like it could be an edge case of some kind. Here is a reproducible example:
`using Lasso, LinearAlgebra, Random
rng = Xoshiro(45);
n = 100;
y = rand(rng, n) .- 0.5;
f_fl = fit(FusedLasso, y, 0.5);
f_tf = fit(TrendFilter, y, 2, 0.5);
`
The trend filter fit results in the following error:
The error is generated regardless of the value of the order parameter. I have attached a plot of the data and the fused lasso coefficients.
In the next example, trend filtering dose work:
`fs = 250.0 # Sampling frequency in Hz
t = 0:1/fs:10 # 10 seconds of data
signal = sin.(2π1.0.t) + 0.5sin.(2π50.0.*t)
lambda = norm(signal, Inf)/2
fit_fl = fit(FusedLasso, signal, lambda);
fit_tf = fit(TrendFilter, signal, 2, lambda);
`
A plot of the results is attached.
I have been using trend filtering often and run into this indexing error ~1/4 of the time.
Cheers
Peter
The text was updated successfully, but these errors were encountered: