Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix null deviance and use Ref instead of Ptr #57

Merged
merged 1 commit into from
Dec 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions src/CoxNet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ end

macro check_and_return_cox()
esc(quote
check_jerr(jerr[1], maxit,pmax)
lmu = lmu[1]
check_jerr(jerr[], maxit, pmax)
lmu = lmu_ref[]
# first lambda is infinity; changed to entry point
if isempty(lambda) && length(alm) > 2
alm[1] = exp(2*log(alm[2])-log(alm[3]))
end
X = CompressedPredictorMatrix(size(X, 2), ca[:, 1:lmu], ia, nin[1:lmu])
GLMNetPath(family, a0[1:lmu], X, null_dev[1], fdev[1:lmu], alm[1:lmu], Int(nlp[1]))
GLMNetPath(family, a0[1:lmu], X, null_dev[], fdev[1:lmu], alm[1:lmu], Int(nlp[]))
end)
end

Expand Down Expand Up @@ -109,7 +109,7 @@ function glmnet!(X::Matrix{Float64}, y::Matrix{Float64}, family::CoxPH;
standardize = Int32(standardize);
intercept = Int32(intercept);
maxit = Int32(maxit);
null_dev = [0.0];
null_dev = Ref(0.0)
jd = Int32(0);
#
ca = zeros(Float64, pmax, nlambda) # fitted coef/param
Expand All @@ -121,22 +121,22 @@ function glmnet!(X::Matrix{Float64}, y::Matrix{Float64}, family::CoxPH;
length(offsets) == length(times) || error("length of offsets must match length of y")
offsets = copy(offsets)
#
ccall((:coxnet_, libglmnet), Nothing, (
Ptr{Float64} , Ptr{Int32} , Ptr{Int32} , Ptr{Float64} , # 1
Ptr{Float64} , Ptr{Float64} , Ptr{Float64} , Ptr{Float64} , # 2
Ptr{Int32} , Ptr{Float64} , Ptr{Float64} , Ptr{Int32} , # 3
Ptr{Int32} , Ptr{Int32} , Ptr{Float64} , Ptr{Float64} , # 4
Ptr{Float64} , Ptr{Int32} , Ptr{Int32} , Ptr{Int32} , # 5
Ptr{Float64} , Ptr{Int32} , Ptr{Int32} , Ptr{Float64} , # 6
Ptr{Float64} , Ptr{Float64} , Ptr{Int32} , Ptr{Int32} # 7
ccall((:coxnet_, libglmnet), Cvoid, (
Ref{Float64} , Ref{Int32} , Ref{Int32} , Ref{Float64} , # 1
Ref{Float64} , Ref{Float64} , Ref{Float64} , Ref{Float64} , # 2
Ref{Int32} , Ref{Float64} , Ref{Float64} , Ref{Int32} , # 3
Ref{Int32} , Ref{Int32} , Ref{Float64} , Ref{Float64} , # 4
Ref{Float64} , Ref{Int32} , Ref{Int32} , Ref{Int32} , # 5
Ref{Float64} , Ref{Int32} , Ref{Int32} , Ref{Float64} , # 6
Ref{Float64} , Ref{Float64} , Ref{Int32} , Ref{Int32} # 7
),
Ref(alpha) , Ref(nobs) , Ref(nvars) , X , # 1
times , status , offsets , weights , # 2
Ref(jd) , penalty_factor , constraints , Ref(dfmax) , # 3
Ref(pmax) , Ref(nlambda) , Ref(lambda_min_ratio) , lambda , # 4
Ref(tol) , Ref(maxit) , Ref(standardize) , lmu , # 5
ca , ia , nin , null_dev , # 6
fdev , alm , nlp , jerr # 7
alpha, nobs, nvars, X, # 1
times, status, offsets, weights, # 2
jd, penalty_factor, constraints, dfmax, # 3
pmax, nlambda, lambda_min_ratio, lambda, # 4
tol, maxit, standardize, lmu_ref, # 5
ca, ia, nin, null_dev, # 6
fdev, alm, nlp, jerr # 7
)
@check_and_return_cox
end
Expand Down
139 changes: 67 additions & 72 deletions src/GLMNet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -241,29 +241,30 @@ macro validate_and_init()
lambda_min_ratio = 2.0
end

lmu = Int32[0]
null_dev = Ref(0.0)
lmu_ref = Ref{Int32}(0)
a0 = zeros(Float64, nlambda)
ca = Matrix{Float64}(undef, pmax, nlambda)
ia = Vector{Int32}(undef, pmax)
nin = Vector{Int32}(undef, nlambda)
fdev = Vector{Float64}(undef, nlambda)
alm = Vector{Float64}(undef, nlambda)
nlp = Int32[0]
jerr = Int32[0]
nlp = Ref{Int32}(0)
jerr = Ref{Int32}(0)
end)
end

macro check_and_return()
esc(quote
check_jerr(jerr[1], maxit, pmax)
check_jerr(jerr[], maxit, pmax)

lmu = lmu[1]
lmu = lmu_ref[]
# first lambda is infinity; changed to entry point
if isempty(lambda) && length(alm) > 2
alm[1] = exp(2*log(alm[2])-log(alm[3]))
end
X = CompressedPredictorMatrix(size(X, 2), ca[:, 1:lmu], ia, nin[1:lmu])
GLMNetPath(family, a0[1:lmu], X, null_dev, fdev[1:lmu], alm[1:lmu], Int(nlp[1]))
GLMNetPath(family, a0[1:lmu], X, null_dev[], fdev[1:lmu], alm[1:lmu], Int(nlp[]))
end)
end

Expand All @@ -279,21 +280,23 @@ function glmnet!(X::Matrix{Float64}, y::Vector{Float64},
intercept::Bool=true, maxit::Int=1000000)
@validate_and_init

ccall((:elnet_, libglmnet), Nothing,
(Ref{Int32}, Ref{Float64}, Ref{Int32}, Ref{Int32}, Ptr{Float64}, Ptr{Float64},
Ptr{Float64}, Ref{Int32}, Ptr{Float64}, Ptr{Float64}, Ref{Int32}, Ref{Int32},
Ref{Int32}, Ref{Float64}, Ptr{Float64}, Ref{Float64}, Ref{Int32}, Ref{Int32},
Ref{Int32}, Ptr{Int32}, Ptr{Float64}, Ptr{Float64}, Ptr{Int32}, Ptr{Int32},
Ptr{Float64}, Ptr{Float64}, Ptr{Int32}, Ptr{Int32}),
# Compute null deviance
w = StatsBase.weights(weights)
mu = mean(y, w)
if !intercept
mu = zero(mu)
end
null_dev[] = sum(w) * var(y, w; mean = mu, corrected = false)

ccall((:elnet_, libglmnet), Cvoid,
(Ref{Int32}, Ref{Float64}, Ref{Int32}, Ref{Int32}, Ref{Float64}, Ref{Float64},
Ref{Float64}, Ref{Int32}, Ref{Float64}, Ref{Float64}, Ref{Int32}, Ref{Int32},
Ref{Int32}, Ref{Float64}, Ref{Float64}, Ref{Float64}, Ref{Int32}, Ref{Int32},
Ref{Int32}, Ref{Int32}, Ref{Float64}, Ref{Float64}, Ref{Int32}, Ref{Int32},
Ref{Float64}, Ref{Float64}, Ref{Int32}, Ref{Int32}),
(naivealgorithm ? 2 : 1), alpha, size(X, 1), size(X, 2), X, y, weights, 0,
penalty_factor, constraints, dfmax, pmax, nlambda, lambda_min_ratio, lambda, tol,
standardize, intercept, maxit, lmu, a0, ca, ia, nin, fdev, alm, nlp, jerr)

null_dev = 0.0
mu = mean(y)
for i = 1:length(y)
null_dev += abs2(null_dev-mu)
end
standardize, intercept, maxit, lmu_ref, a0, ca, ia, nin, fdev, alm, nlp, jerr)

@check_and_return
end
Expand All @@ -309,23 +312,25 @@ function glmnet!(X::SparseMatrixCSC{Float64,Int32}, y::Vector{Float64},
intercept::Bool=true, maxit::Int=1000000)
@validate_and_init

ccall((:spelnet_, libglmnet), Nothing,
(Ref{Int32}, Ref{Float64}, Ref{Int32}, Ref{Int32}, Ptr{Float64}, Ptr{Int32},
Ptr{Int32}, Ptr{Float64}, Ptr{Float64}, Ref{Int32}, Ptr{Float64}, Ptr{Float64},
Ref{Int32}, Ref{Int32}, Ref{Int32}, Ref{Float64}, Ptr{Float64}, Ref{Float64},
Ref{Int32}, Ref{Int32}, Ref{Int32}, Ptr{Int32}, Ptr{Float64}, Ptr{Float64},
Ptr{Int32}, Ptr{Int32}, Ptr{Float64}, Ptr{Float64}, Ptr{Int32}, Ptr{Int32}),
# Compute null deviance
w = StatsBase.weights(weights)
mu = mean(y, w)
if !intercept
mu = zero(mu)
end
null_dev[] = sum(w) * var(y, w; mean = mu, corrected = false)

ccall((:spelnet_, libglmnet), Cvoid,
(Ref{Int32}, Ref{Float64}, Ref{Int32}, Ref{Int32}, Ref{Float64}, Ref{Int32},
Ref{Int32}, Ref{Float64}, Ref{Float64}, Ref{Int32}, Ref{Float64}, Ref{Float64},
Ref{Int32}, Ref{Int32}, Ref{Int32}, Ref{Float64}, Ref{Float64}, Ref{Float64},
Ref{Int32}, Ref{Int32}, Ref{Int32}, Ref{Int32}, Ref{Float64}, Ref{Float64},
Ref{Int32}, Ref{Int32}, Ref{Float64}, Ref{Float64}, Ref{Int32}, Ref{Int32}),
(naivealgorithm ? 2 : 1), alpha, size(X, 1), size(X, 2), X.nzval, X.colptr,
X.rowval, y, weights, 0, penalty_factor, constraints, dfmax, pmax, nlambda,
lambda_min_ratio, lambda, tol, standardize, intercept, maxit, lmu, a0, ca, ia,
lambda_min_ratio, lambda, tol, standardize, intercept, maxit, lmu_ref, a0, ca, ia,
nin, fdev, alm, nlp, jerr)

null_dev = 0.0
mu = mean(y)
for i = 1:length(y)
null_dev += abs2(null_dev-mu)
end

@check_and_return
end

Expand All @@ -350,8 +355,6 @@ function glmnet!(X::Matrix{Float64}, y::Matrix{Float64},
offsets::Vector{Float64} = isa(offsets, Nothing) ? zeros(size(y, 1)) : copy(offsets)
length(offsets) == size(y, 1) || error("length of offsets must match length of y")

null_dev = Vector{Float64}(undef, 1)

# The Fortran code expects positive responses in first column, but
# this convention is evidently unacceptable to the authors of the R
# code, and, apparently, to us
Expand All @@ -362,17 +365,16 @@ function glmnet!(X::Matrix{Float64}, y::Matrix{Float64},
y[i, 2] = a*weights[i]
end

ccall((:lognet_, libglmnet), Nothing,
(Ref{Float64}, Ref{Int32}, Ref{Int32}, Ref{Int32}, Ptr{Float64}, Ptr{Float64},
Ptr{Float64}, Ref{Int32}, Ptr{Float64}, Ptr{Float64}, Ref{Int32}, Ref{Int32},
Ref{Int32}, Ref{Float64}, Ptr{Float64}, Ref{Float64}, Ref{Int32}, Ref{Int32},
Ref{Int32}, Ref{Int32}, Ptr{Int32}, Ptr{Float64}, Ptr{Float64}, Ptr{Int32},
Ptr{Int32}, Ptr{Float64}, Ptr{Float64}, Ptr{Float64}, Ptr{Int32}, Ptr{Int32}),
ccall((:lognet_, libglmnet), Cvoid,
(Ref{Float64}, Ref{Int32}, Ref{Int32}, Ref{Int32}, Ref{Float64}, Ref{Float64},
Ref{Float64}, Ref{Int32}, Ref{Float64}, Ref{Float64}, Ref{Int32}, Ref{Int32},
Ref{Int32}, Ref{Float64}, Ref{Float64}, Ref{Float64}, Ref{Int32}, Ref{Int32},
Ref{Int32}, Ref{Int32}, Ref{Int32}, Ref{Float64}, Ref{Float64}, Ref{Int32},
Ref{Int32}, Ref{Float64}, Ref{Float64}, Ref{Float64}, Ref{Int32}, Ref{Int32}),
alpha, size(X, 1), size(X, 2), 1, X, y, copy(offsets), 0, penalty_factor,
constraints, dfmax, pmax, nlambda, lambda_min_ratio, lambda, tol, standardize,
intercept, maxit, kopt, lmu, a0, ca, ia, nin, null_dev, fdev, alm, nlp, jerr)
intercept, maxit, kopt, lmu_ref, a0, ca, ia, nin, null_dev, fdev, alm, nlp, jerr)

null_dev = null_dev[1]
@check_and_return
end
function glmnet!(X::SparseMatrixCSC{Float64,Int32}, y::Matrix{Float64},
Expand All @@ -396,8 +398,6 @@ function glmnet!(X::SparseMatrixCSC{Float64,Int32}, y::Matrix{Float64},
offsets::Vector{Float64} = isa(offsets, Nothing) ? zeros(size(y, 1)) : copy(offsets)
length(offsets) == size(y, 1) || error("length of offsets must match length of y")

null_dev = Vector{Float64}(undef, 1)

# The Fortran code expects positive responses in first column, but
# this convention is evidently unacceptable to the authors of the R
# code, and, apparently, to us
Expand All @@ -408,19 +408,18 @@ function glmnet!(X::SparseMatrixCSC{Float64,Int32}, y::Matrix{Float64},
y[i, 2] = a*weights[i]
end

ccall((:splognet_, libglmnet), Nothing,
(Ref{Float64}, Ref{Int32}, Ref{Int32}, Ref{Int32}, Ptr{Float64}, Ptr{Int32},
Ptr{Int32}, Ptr{Float64}, Ptr{Float64}, Ref{Int32}, Ptr{Float64}, Ptr{Float64},
Ref{Int32}, Ref{Int32}, Ref{Int32}, Ref{Float64}, Ptr{Float64}, Ref{Float64},
Ref{Int32}, Ref{Int32}, Ref{Int32}, Ref{Int32}, Ptr{Int32}, Ptr{Float64},
Ptr{Float64}, Ptr{Int32}, Ptr{Int32}, Ptr{Float64}, Ptr{Float64}, Ptr{Float64},
Ptr{Int32}, Ptr{Int32}),
ccall((:splognet_, libglmnet), Cvoid,
(Ref{Float64}, Ref{Int32}, Ref{Int32}, Ref{Int32}, Ref{Float64}, Ref{Int32},
Ref{Int32}, Ref{Float64}, Ref{Float64}, Ref{Int32}, Ref{Float64}, Ref{Float64},
Ref{Int32}, Ref{Int32}, Ref{Int32}, Ref{Float64}, Ref{Float64}, Ref{Float64},
Ref{Int32}, Ref{Int32}, Ref{Int32}, Ref{Int32}, Ref{Int32}, Ref{Float64},
Ref{Float64}, Ref{Int32}, Ref{Int32}, Ref{Float64}, Ref{Float64}, Ref{Float64},
Ref{Int32}, Ref{Int32}),
alpha, size(X, 1), size(X, 2), 1, X.nzval, X.colptr, X.rowval, y, copy(offsets),
0, penalty_factor, constraints, dfmax, pmax, nlambda, lambda_min_ratio, lambda,
tol, standardize, intercept, maxit, kopt, lmu, a0, ca, ia, nin, null_dev, fdev,
tol, standardize, intercept, maxit, kopt, lmu_ref, a0, ca, ia, nin, null_dev, fdev,
alm, nlp, jerr)

null_dev = null_dev[1]
@check_and_return
end

Expand All @@ -436,22 +435,20 @@ function glmnet!(X::Matrix{Float64}, y::Vector{Float64},
lambda::Vector{Float64}=Float64[], tol::Real=1e-7, standardize::Bool=true,
intercept::Bool=true, maxit::Int=1000000)
@validate_and_init
null_dev = Vector{Float64}(undef, 1)

offsets::Vector{Float64} = isa(offsets, Nothing) ? zeros(length(y)) : copy(offsets)
length(offsets) == length(y) || error("length of offsets must match length of y")

ccall((:fishnet_, libglmnet), Nothing,
(Ref{Float64}, Ref{Int32}, Ref{Int32}, Ptr{Float64}, Ptr{Float64},
Ptr{Float64}, Ptr{Float64}, Ref{Int32}, Ptr{Float64}, Ptr{Float64}, Ref{Int32},
Ref{Int32}, Ref{Int32}, Ref{Float64}, Ptr{Float64}, Ref{Float64}, Ref{Int32},
Ref{Int32}, Ref{Int32}, Ptr{Int32}, Ptr{Float64}, Ptr{Float64}, Ptr{Int32},
Ptr{Int32}, Ptr{Float64}, Ptr{Float64}, Ptr{Float64}, Ptr{Int32}, Ptr{Int32}),
ccall((:fishnet_, libglmnet), Cvoid,
(Ref{Float64}, Ref{Int32}, Ref{Int32}, Ref{Float64}, Ref{Float64},
Ref{Float64}, Ref{Float64}, Ref{Int32}, Ref{Float64}, Ref{Float64}, Ref{Int32},
Ref{Int32}, Ref{Int32}, Ref{Float64}, Ref{Float64}, Ref{Float64}, Ref{Int32},
Ref{Int32}, Ref{Int32}, Ref{Int32}, Ref{Float64}, Ref{Float64}, Ref{Int32},
Ref{Int32}, Ref{Float64}, Ref{Float64}, Ref{Float64}, Ref{Int32}, Ref{Int32}),
alpha, size(X, 1), size(X, 2), X, y, offsets, weights, 0, penalty_factor,
constraints, dfmax, pmax, nlambda, lambda_min_ratio, lambda, tol, standardize,
intercept, maxit, lmu, a0, ca, ia, nin, null_dev, fdev, alm, nlp, jerr)
intercept, maxit, lmu_ref, a0, ca, ia, nin, null_dev, fdev, alm, nlp, jerr)

null_dev = null_dev[1]
@check_and_return
end
function glmnet!(X::SparseMatrixCSC{Float64,Int32}, y::Vector{Float64},
Expand All @@ -466,24 +463,22 @@ function glmnet!(X::SparseMatrixCSC{Float64,Int32}, y::Vector{Float64},
lambda::Vector{Float64}=Float64[], tol::Real=1e-7, standardize::Bool=true,
intercept::Bool=true, maxit::Int=1000000)
@validate_and_init
null_dev = Vector{Float64}(undef, 1)

offsets::Vector{Float64} = isa(offsets, Nothing) ? zeros(length(y)) : copy(offsets)
length(offsets) == length(y) || error("length of offsets must match length of y")

ccall((:spfishnet_, libglmnet), Nothing,
(Ref{Float64}, Ref{Int32}, Ref{Int32}, Ptr{Float64}, Ptr{Int32}, Ptr{Int32},
Ptr{Float64}, Ptr{Float64}, Ptr{Float64}, Ref{Int32}, Ptr{Float64}, Ptr{Float64},
Ref{Int32}, Ref{Int32}, Ref{Int32}, Ref{Float64}, Ptr{Float64}, Ref{Float64},
Ref{Int32}, Ref{Int32}, Ref{Int32}, Ptr{Int32}, Ptr{Float64}, Ptr{Float64},
Ptr{Int32}, Ptr{Int32}, Ptr{Float64}, Ptr{Float64}, Ptr{Float64}, Ptr{Int32},
Ptr{Int32}),
ccall((:spfishnet_, libglmnet), Cvoid,
(Ref{Float64}, Ref{Int32}, Ref{Int32}, Ref{Float64}, Ref{Int32}, Ref{Int32},
Ref{Float64}, Ref{Float64}, Ref{Float64}, Ref{Int32}, Ref{Float64}, Ref{Float64},
Ref{Int32}, Ref{Int32}, Ref{Int32}, Ref{Float64}, Ref{Float64}, Ref{Float64},
Ref{Int32}, Ref{Int32}, Ref{Int32}, Ref{Int32}, Ref{Float64}, Ref{Float64},
Ref{Int32}, Ref{Int32}, Ref{Float64}, Ref{Float64}, Ref{Float64}, Ref{Int32},
Ref{Int32}),
alpha, size(X, 1), size(X, 2), X.nzval, X.colptr, X.rowval, y, offsets, weights,
0, penalty_factor, constraints, dfmax, pmax, nlambda, lambda_min_ratio, lambda,
tol, standardize, intercept, maxit, lmu, a0, ca, ia, nin, null_dev, fdev, alm,
tol, standardize, intercept, maxit, lmu_ref, a0, ca, ia, nin, null_dev, fdev, alm,
nlp, jerr)

null_dev = null_dev[1]
@check_and_return
end

Expand Down
50 changes: 25 additions & 25 deletions src/Multinomial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -105,33 +105,33 @@ macro validate_and_init_multi()
standardize = Int32(standardize)
intercept = Int32(intercept)
maxit = Int32(maxit)
null_dev = [0.0]
null_dev = Ref(0.0)
jd = Int32(0)
#
lmu = Int32[0]
lmu_ref = Ref{Int32}(0)
a0 = zeros(Float64, nresp, nlambda)
ca = zeros(Float64, pmax, nresp, nlambda)
ia = zeros(Int32, pmax)
nin = zeros(Int32, nlambda)
fdev = zeros(Float64, nlambda)
alm = zeros(Float64, nlambda)
nlp = Int32[0]
jerr = Int32[0]
nlp = Ref{Int32}(0)
jerr = Ref{Int32}(0)
end)
end


macro check_and_return_multi()
esc(quote
check_jerr(jerr[1], maxit,pmax)
lmu = lmu[1]
check_jerr(jerr[], maxit,pmax)
lmu = lmu_ref[]
# first lambda is infinity; changed to entry point
if isempty(lambda) && length(alm) > 2
alm[1] = exp(2*log(alm[2])-log(alm[3]))
end
a0 = a0 .- repeat(mean(a0, dims=1), size(a0, 1))
GLMNetPath(family, a0[:, 1:lmu], ca[sortperm(ia), :, 1:lmu],
null_dev[1], fdev[1:lmu], alm[1:lmu], Int(nlp[1]))
GLMNetPath(family, a0[:, 1:lmu], ca[sortperm(ia), :, 1:lmu],
null_dev[], fdev[1:lmu], alm[1:lmu], Int(nlp[]))
end)
end

Expand Down Expand Up @@ -160,24 +160,24 @@ function glmnet!(X::Matrix{Float64}, y::Matrix{Float64},
y = y .* repeat(weights, 1, size(y, 2))

ccall(
(:lognet_, libglmnet), Nothing, (
Ptr{Float64} , Ptr{Int32} , Ptr{Int32} , Ptr{Int32} , # 1
Ptr{Float64} , Ptr{Float64} , Ptr{Float64} , Ptr{Int32} , # 2
Ptr{Float64} , Ptr{Float64} , Ptr{Int32} , Ptr{Int32} , # 3
Ptr{Int32} , Ptr{Float64} , Ptr{Float64} , Ptr{Float64} , # 4
Ptr{Int32} , Ptr{Int32} , Ptr{Int32} , Ptr{Int32} , # 5
Ptr{Int32} , Ptr{Float64} , Ptr{Float64} , Ptr{Int32} , # 6
Ptr{Int32} , Ptr{Float64} , Ptr{Float64} , Ptr{Float64} , # 7
Ptr{Int32} , Ptr{Int32} # 8
(:lognet_, libglmnet), Cvoid, (
Ref{Float64} , Ref{Int32} , Ref{Int32} , Ref{Int32} , # 1
Ref{Float64} , Ref{Float64} , Ref{Float64} , Ref{Int32} , # 2
Ref{Float64} , Ref{Float64} , Ref{Int32} , Ref{Int32} , # 3
Ref{Int32} , Ref{Float64} , Ref{Float64} , Ref{Float64} , # 4
Ref{Int32} , Ref{Int32} , Ref{Int32} , Ref{Int32} , # 5
Ref{Int32} , Ref{Float64} , Ref{Float64} , Ref{Int32} , # 6
Ref{Int32} , Ref{Float64} , Ref{Float64} , Ref{Float64} , # 7
Ref{Int32} , Ref{Int32} # 8
),
Ref(alpha) , Ref(nobs) , Ref(nvars) , Ref(nresp) , # 1
X , y , offsets , Ref(jd) , # 2
penalty_factor , constraints , Ref(dfmax) , Ref(pmax) , # 3
Ref(nlambda) , Ref(lambda_min_ratio) , lambda , Ref(tol) , # 4
Ref(standardize) , Ref(intercept) , Ref(maxit) , Ref(kopt) , # 5
lmu , a0 , ca , ia , # 6
nin , null_dev , fdev , alm , # 7
nlp , jerr # 8
alpha, nobs, nvars, nresp, # 1
X, y, offsets, jd, # 2
penalty_factor, constraints, dfmax, pmax, # 3
nlambda, lambda_min_ratio, lambda, tol, # 4
standardize, intercept, maxit, kopt, # 5
lmu_ref, a0, ca, ia, # 6
nin, null_dev, fdev, alm, # 7
nlp, jerr # 8
)
@check_and_return_multi
end
Expand Down
Loading