Skip to content

Commit 92a670c

Browse files
committed
v0.8.15
1 parent 45a4b35 commit 92a670c

9 files changed

Lines changed: 27 additions & 19 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
# v0.8.15 (Upcoming release)
1+
# v0.8.16 (Upcoming Release)
2+
3+
4+
# v0.8.15
25
- Modularize dataimage()
36
- Grouped tests
7+
- x === nothing style decisions replaces by isnothing(x)
48

59

610
# v0.8.14

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "LinRegOutliers"
22
uuid = "6d4de0fb-32d9-4c65-aac1-cc9ed8b94b1a"
33
authors = ["Mehmet Hakan Satman <mhsatman@gmail.com>", "Shreesh Adiga <16567adigashreesh@gmail.com>", "Guillermo Angeris <angeris@stanford.edu>", "Emre Akadal <emre.akadal@istanbul.edu.tr>"]
4-
version = "0.8.14"
4+
version = "0.8.15"
55

66
[deps]
77
Clustering = "aaaa29a8-35af-508c-8bc3-b662a17a0fe5"

src/atkinson94.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function atkinson94(
6969
# the median index
7070
h = Int(floor((n + p + 1) / 2.0))
7171

72-
if iters === nothing
72+
if isnothing(iters)
7373
iters = minimum([500 * p, 3000])
7474
end
7575

src/diagnostics.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ end
5555
function mahalanobisSquaredBetweenPairs(pairs::Matrix; covmatrix = nothing)
5656
n, _ = size(pairs)
5757
newmat = zeros(Float64, n, n)
58-
if covmatrix === nothing
58+
if isnothing(covmatrix)
5959
covmatrix = cov(pairs)
6060
end
6161
try
@@ -526,10 +526,10 @@ function mahalanobisSquaredMatrix(
526526
meanvector = nothing,
527527
covmatrix = nothing,
528528
)::Union{Nothing,Array{Float64,2}}
529-
if meanvector === nothing
529+
if isnothing(meanvector)
530530
meanvector = applyColumns(mean, datamat)
531531
end
532-
if covmatrix === nothing
532+
if isnothing(covmatrix)
533533
covmatrix = cov(datamat)
534534
end
535535
try

src/hs93.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ function hs93(
183183
alpha = 0.05,
184184
basicsubsetindices = nothing,
185185
)
186-
if basicsubsetindices === nothing
186+
if isnothing(basicsubsetindices)
187187
initialsetindices = hs93initialset(X, y)
188188
basicsubsetindices = hs93basicsubset(X, y, initialsetindices)
189189
end

src/lms.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ end
6565
function lms(X::Array{Float64,2}, y::Array{Float64,1}; iters = nothing, crit = 2.5)
6666
n, p = size(X)
6767
h = Int(floor((n + 1.0) / 2.0))
68-
if iters === nothing
68+
if isnothing(iters)
6969
iters = minimum([500 * p, 3000])
7070
end
7171
bestobjective = Inf

src/lts.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ end
147147
function lts(X::Array{Float64,2}, y::Array{Float64,1}; iters = nothing, crit = 2.5)
148148
n, p = size(X)
149149
h = Int(floor((n + p + 1.0) / 2.0))
150-
if iters === nothing
150+
if isnothing(iters)
151151
iters = minimum([500 * p, 3000])
152152
end
153153
allindices = collect(1:n)

src/satman2013.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ function satman2013(X::Array{Float64,2}, y::Array{Float64,1})
8888
sorted_indices = sortperm(md)
8989
best_h_indices = sorted_indices[1:h]
9090

91-
crit, bestset = iterateCSteps(X, y, best_h_indices, h)
91+
_, bestset = iterateCSteps(X, y, best_h_indices, h)
9292

9393
olsreg = ols(X[bestset, :], y[bestset])
9494
betas = coef(olsreg)

src/satman2015.jl

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ Sort multidimensional data usin non-dominated sorting algorithm.
5858
5959
6060
# References
61-
Satman, Mehmet Hakan. "A new algorithm for detecting outliers in linear regression."
62-
International Journal of statistics and Probability 2.3 (2013): 101.
61+
Satman, Mehmet Hakan. "Fast online detection of outliers using least-trimmed squares
62+
regression with non-dominated sorting based initial subsets."
63+
International Journal of Advanced Statistics and Probability 3.1 (2015): 53.
6364
6465
Deb, Kalyanmoy, et al. "A fast elitist non-dominated sorting genetic algorithm for multi-objective optimization: NSGA-II."
6566
International conference on parallel problem solving from nature. Springer, Berlin, Heidelberg, 2000.
@@ -140,8 +141,9 @@ julia> ndsranks(datamat)
140141
```
141142
142143
# References
143-
Satman, Mehmet Hakan. "A new algorithm for detecting outliers in linear regression."
144-
International Journal of statistics and Probability 2.3 (2013): 101.
144+
Satman, Mehmet Hakan. "Fast online detection of outliers using least-trimmed squares
145+
regression with non-dominated sorting based initial subsets."
146+
International Journal of Advanced Statistics and Probability 3.1 (2015): 53.
145147
146148
Deb, Kalyanmoy, et al. "A fast elitist non-dominated sorting genetic algorithm for multi-objective optimization: NSGA-II."
147149
International conference on parallel problem solving from nature. Springer, Berlin, Heidelberg, 2000.
@@ -192,8 +194,9 @@ julia> midlist(10,3)
192194
```
193195
194196
# References
195-
Satman, Mehmet Hakan. "A new algorithm for detecting outliers in linear regression."
196-
International Journal of statistics and Probability 2.3 (2013): 101.
197+
Satman, Mehmet Hakan. "Fast online detection of outliers using least-trimmed squares
198+
regression with non-dominated sorting based initial subsets."
199+
International Journal of Advanced Statistics and Probability 3.1 (2015): 53.
197200
"""
198201
function midlist(n::Int, p::Int)::Array{Int,1}
199202
midlist = []
@@ -238,8 +241,9 @@ Dict{Any,Any} with 1 entry:
238241
```
239242
240243
# References
241-
Satman, Mehmet Hakan. "A new algorithm for detecting outliers in linear regression."
242-
International Journal of statistics and Probability 2.3 (2013): 101.
244+
Satman, Mehmet Hakan. "Fast online detection of outliers using least-trimmed squares
245+
regression with non-dominated sorting based initial subsets."
246+
International Journal of Advanced Statistics and Probability 3.1 (2015): 53.
243247
"""
244248
function satman2015(setting::RegressionSetting)
245249
X, y = @extractRegressionSetting setting
@@ -271,7 +275,7 @@ function satman2015(X::Array{Float64,2}, y::Array{Float64,1})
271275
sorted_indices = sortperm(md)
272276
best_h_indices = sorted_indices[1:h]
273277

274-
crit, bestset = iterateCSteps(X, y, best_h_indices, h)
278+
_, bestset = iterateCSteps(X, y, best_h_indices, h)
275279

276280
olsreg = ols(X[bestset, :], y[bestset])
277281
betas = coef(olsreg)

0 commit comments

Comments
 (0)