Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jbytecode committed Feb 7, 2024
1 parent 79b56a6 commit 7728ff5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# v0.11.3 (Upcoming Release)
# v0.11.4 (Upcoming Release)


# v0.11.3

- Minor fixes

# v0.11.2

- Optional eps and maxiter parameters in iterateCSteps() in LTS.
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "LinRegOutliers"
uuid = "6d4de0fb-32d9-4c65-aac1-cc9ed8b94b1a"
authors = ["Mehmet Hakan Satman <[email protected]>", "Shreesh Adiga <[email protected]>", "Guillermo Angeris <[email protected]>", "Emre Akadal <[email protected]>"]
version = "0.11.2"
version = "0.11.3"

[deps]
Clustering = "aaaa29a8-35af-508c-8bc3-b662a17a0fe5"
Expand Down
2 changes: 1 addition & 1 deletion src/lms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function lms(X::AbstractMatrix{Float64}, y::AbstractVector{Float64}; iters = not
bestres = []
indices = collect(1:n)
kindices = collect(p:n)
for iter = 1:iters
for _ = 1:iters
try
k = rand(kindices, 1)[1]
sampledindices = sample(indices, k, replace = false)
Expand Down
6 changes: 0 additions & 6 deletions src/lts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,10 @@ function iterateCSteps(
subsetindices::Array{Int,1},
h::Int; eps::Float64 = 0.01, maxiter::Int = 10000
)
#starterset = subsetindices
oldobjective::Float64 = Inf64
objective::Float64 = Inf64
iter::Int = 0
while iter < maxiter
#betas = X[subsetindices, :] \ y[subsetindices]
#res = y - X * betas
tempols = ols(X[subsetindices, :], y[subsetindices])
res = y - X * coef(tempols)
sortedresindices = sortperm(abs.(res))
Expand All @@ -63,9 +60,6 @@ function iterateCSteps(
oldobjective = objective
iter += 1
end
#if iter >= maxiter
# @warn "in c-step stage of LTS, a h-subset is not converged for starting indices " starterset
#end
return (objective, subsetindices)
end

Expand Down

2 comments on commit 7728ff5

@jbytecode
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/100413

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.11.3 -m "<description of version>" 7728ff5116ee5bd85df3d70aad56143b22ba8dd2
git push origin v0.11.3

Please sign in to comment.