maybe this is related to #54 , but LassoPath seems to struggle for small λ's, in particular for λ=0 (least squares solution). Here is a MWE:
using Lasso
using StatsBase
using Random
##
Random.seed!(1234)
# time series length
N = 5
# create a random time series of length N
s = rand(N)
# create a Data Matrix
Θ = ones(N,15)
Θ[1:50] .= 0
shuffle!(Θ)
# λ 1e-1 works
Lf = fit(LassoPath, Θ, s; standardize = false, intercept = false, λ=[1e-1])
# λ 1e-2 fails
Lf = fit(LassoPath, Θ, s; standardize = false, intercept = false, λ=[1e-2])
# ERROR: BoundsError: attempt to access 10×15 Array{Float64,2} at index [11, 12]
In Matlab's lasso this is no problem and λ=0 yields the least squares solution.
Hey people,
maybe this is related to #54 , but
LassoPath
seems to struggle for smallλ's
, in particular forλ=0
(least squares solution). Here is a MWE:In Matlab's
lasso
this is no problem andλ=0
yields the least squares solution.What am I missing here? Any help is appreciated,
Cheers