-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
164 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,25 +2,20 @@ using Documenter, LinRegOutliers | |
|
||
|
||
makedocs( | ||
format = Documenter.HTML( | ||
prettyurls = get(ENV, "CI", nothing) == "true", | ||
collapselevel = 2, | ||
# assets = ["assets/favicon.ico", "assets/extra_styles.css"], | ||
), | ||
sitename="LinRegOutliers", | ||
authors = "Mehmet Hakan Satman <[email protected]>, Shreesh Adiga <[email protected]>, Guillermo Angeris <[email protected]>, Emre Akadal <[email protected]>", | ||
pages = [ | ||
"Algorithms" => "algorithms.md", | ||
"Diagnostics" => "diagnostics.md", | ||
"Types" => "types.md", | ||
"Datasets" => "datasets.md" | ||
] | ||
) | ||
|
||
|
||
deploydocs( | ||
repo = "github.com/jbytecode/LinRegOutliers", | ||
format = Documenter.HTML( | ||
prettyurls = get(ENV, "CI", nothing) == "true", | ||
collapselevel = 2, | ||
# assets = ["assets/favicon.ico", "assets/extra_styles.css"], | ||
), | ||
sitename = "LinRegOutliers", | ||
authors = "Mehmet Hakan Satman <[email protected]>, Shreesh Adiga <[email protected]>, Guillermo Angeris <[email protected]>, Emre Akadal <[email protected]>", | ||
pages = [ | ||
"Algorithms" => "algorithms.md", | ||
"Diagnostics" => "diagnostics.md", | ||
"Types" => "types.md", | ||
"Datasets" => "datasets.md", | ||
], | ||
) | ||
|
||
|
||
|
||
deploydocs(repo = "github.com/jbytecode/LinRegOutliers") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
module HookeJeeves | ||
|
||
export hj | ||
|
||
function mutate(par, p, d) | ||
newpar = copy(par) | ||
newpar[p] += d | ||
return newpar | ||
end | ||
|
||
function hj( | ||
f::FType, | ||
par::Vector{Float64}; | ||
maxiter = 1000, | ||
startstep = 5.0, | ||
endstep = 0.0001, | ||
) where {FType<:Function} | ||
p = length(par) | ||
currentstep = startstep | ||
iter::Int64 = 0 | ||
while iter < maxiter | ||
fold = f(par) | ||
fnow = fold | ||
for currentp = 1:p | ||
mutateleft = mutate(par, currentp, -currentstep) | ||
fleft = f(mutateleft) | ||
mutateright = mutate(par, currentp, currentstep) | ||
fright = f(mutateright) | ||
if fleft < fold | ||
par = mutateleft | ||
fnow = fleft | ||
elseif fright < fold | ||
par = mutateright | ||
fnow = fright | ||
end | ||
end | ||
if fold <= fnow | ||
currentstep /= 2 | ||
end | ||
if currentstep < endstep | ||
break | ||
end | ||
iter += 1 | ||
end | ||
|
||
return Dict("par" => par, "iter" => iter, "step" => currentstep) | ||
end | ||
|
||
end # end of module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters