Skip to content

Commit ecd62e9

Browse files
committed
deepestregression returns Dict rather than a vector
1 parent 3ab375b commit ecd62e9

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
- Add `Julia v.1.10` to GitHub actions
55
- Initial attempt to reduce memory allocations in `lts()`, `lms()`, `hadi92()`, `hadi94()`, `hs93()`, `robcov()`
66
- Replace `@assert` macro with `throw(ErrorException())` in whole code
7+
- `depestregression` returns `Dict` instead of a `vector` of betas like other regression methods.
8+
79

810
# v0.11.3
911

src/deepestregression.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function deepestregression(setting::RegressionSetting; maxit::Int = 10000)
3939
return deepestregression(X, y, maxit = maxit)
4040
end
4141

42-
function deepestregression(X::AbstractMatrix{Float64}, y::AbstractVector{Float64}; maxit::Int = 10000)::AbstractVector{Float64}
42+
function deepestregression(X::AbstractMatrix{Float64}, y::AbstractVector{Float64}; maxit::Int = 10000)::Dict
4343
drdata = hcat(X, y)
4444
n, p = size(drdata)
4545
n = Int32(n)
@@ -59,7 +59,8 @@ function deepestregression(X::AbstractMatrix{Float64}, y::AbstractVector{Float64
5959
Ref{Cint}, # MDEPAPPR
6060
), drdata, n, p, betas, maxit, iter, MDEPAPPR)
6161

62-
return vcat(betas[end], betas[1:(end-1)])
62+
betas = vcat(betas[end], betas[1:(end-1)])
63+
return Dict("betas" => betas)
6364
end
6465

6566

0 commit comments

Comments
 (0)