diff --git a/src/Lasso.jl b/src/Lasso.jl index 234e551..81f2610 100644 --- a/src/Lasso.jl +++ b/src/Lasso.jl @@ -210,7 +210,7 @@ function computeλ(Xy, λminratio, α, nλ, ω::Union{Vector,Void}) end λmax /= α logλmax = log(λmax) - λ = exp(linspace(logλmax, logλmax + log(λminratio), nλ)) + λ = exp.(linspace(logλmax, logλmax + log(λminratio), nλ)) end # rescales A so that it sums to base @@ -344,9 +344,9 @@ dispersion_parameter(path::RegularizationPath) = GLM.dispersion_parameter(distfu function StatsBase.loglikelihood(path::RegularizationPath) n = nobs(path) if typeof(path.m) <: LinearModel - -0.5*n.*log(deviance(path)) + -0.5.*n.*log.(deviance(path)) else - -0.5*n.*deviance(path) + -0.5.*n.*deviance(path) end end diff --git a/test/lasso.jl b/test/lasso.jl index bc97bc2..486edc3 100644 --- a/test/lasso.jl +++ b/test/lasso.jl @@ -120,7 +120,7 @@ facts("LassoPath") do if niter == 0 niter = l.niter else - @fact l.niter --> niter + @fact abs(niter - l.niter) --> less_than_or_equal(10) end end # end