@@ -208,6 +208,7 @@ const MAX_DEV_FRAC = 0.999
208208
209209# Compute automatic λ values based on λmax and λminratio
210210function computeλ (λmax, λminratio, α, nλ)
211+ ! iszero (α) || error (" α must be nonzero for λ to be computed automatically." )
211212 λmax /= α
212213 logλmax = log (λmax)
213214 exp .(range (logλmax, stop= logλmax + log (λminratio), length= nλ))
@@ -404,8 +405,8 @@ fit(LassoPath, X, y, Binomial(), Logit();
404405 `λmax` to `λminratio * λmax`.
405406- `α=1`: Value between 0 and 1 controlling the balance between ridge (``\a lpha = 0``)
406407 and lasso (``\a lpha = 1``) regression.
407- α cannot be set to 0, though it may be set to 1.
408- - `nλ=100` number of λ values to use
408+ `α` cannot be set to 0 if `λ` was not specified , though it may be set to 1.
409+ - `nλ=100` number of `λ` values to use
409410- `λminratio=1e-4` if more observations than predictors otherwise 0.001.
410411- `stopearly=true`: When `true`, if the proportion of deviance explained
411412 exceeds 0.999 or the difference between the deviance explained by successive λ
@@ -477,7 +478,7 @@ function StatsBase.fit(::Type{LassoPath},
477478
478479 # Lasso initialization
479480 α = convert (T, α)
480- 0 < α <= 1 || error (" α must satisfy 0 < α <= 1" )
481+ 0 <= α <= 1 || error (" α must satisfy 0 <= α <= 1" )
481482 λminratio = convert (T, λminratio)
482483 coefitr = randomize ? RandomCoefficientIterator (rng) : (1 : 0 )
483484
0 commit comments