-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* rename to Downhill.jl * Prepare to rename and release
- Loading branch information
Showing
22 changed files
with
206 additions
and
137 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: TagBot | ||
on: | ||
issue_comment: | ||
types: | ||
- created | ||
workflow_dispatch: | ||
jobs: | ||
TagBot: | ||
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: JuliaRegistries/TagBot@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
ssh: ${{ secrets.DOCUMENTER_KEY }} |
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 |
---|---|---|
|
@@ -6,4 +6,4 @@ | |
*.mem | ||
*.cov | ||
docs/build | ||
Manifest.toml | ||
Manifest*.toml |
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 |
---|---|---|
@@ -1,12 +1,10 @@ | ||
name = "DescentMethods" | ||
uuid = "f4becde8-b16e-4b5a-8f91-16ef0c22c8bc" | ||
authors = ["Vasily <[email protected]>"] | ||
name = "Downhill" | ||
uuid = "a4c28711-7027-4a57-8564-74545b4697a4" | ||
version = "0.1.0" | ||
|
||
[deps] | ||
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | ||
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" | ||
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" | ||
|
||
[compat] | ||
julia = ">= 1.6" | ||
julia = ">= 1.6" |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# DescentMethods.jl | ||
# Downhill.jl | ||
|
||
A collection of descent-based optimization methods. | ||
|
||
|
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 |
---|---|---|
@@ -1,19 +1,22 @@ | ||
push!(LOAD_PATH,"../") | ||
|
||
using Documenter | ||
using DescentMethods | ||
using Downhill | ||
|
||
makedocs( | ||
; | ||
sitename="Documentation", | ||
modules=[DescentMethods], | ||
sitename="Downhill.jl documentation", | ||
modules=[Downhill], | ||
pages = [ | ||
"index.md", | ||
"Optimization Methods" => "core_types.md", | ||
"Basic Functions" => "functions.md", | ||
] | ||
], | ||
format = Documenter.HTML( | ||
prettyurls = get(ENV, "CI", nothing) == "true" | ||
) | ||
) | ||
|
||
deploydocs( | ||
repo = "github.com/vvpisarev/DescentMethods.jl.git", | ||
repo = "github.com/vvpisarev/Downhill.jl.git", | ||
) |
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
# Basic Functions | ||
|
||
```@meta | ||
CurrentModule = DescentMethods | ||
CurrentModule = Downhill | ||
``` | ||
|
||
```@docs | ||
optimize | ||
optimize! | ||
solver | ||
reset! | ||
``` |
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 |
---|---|---|
@@ -1,5 +1,36 @@ | ||
# DescentMethods.jl | ||
# Downhill.jl | ||
|
||
```@meta | ||
CurrentModule = DescentMethods | ||
CurrentModule = Downhill | ||
``` | ||
|
||
A collection of descent-based optimization methods. | ||
|
||
The package is meant to be used for small-scale optimization problems. | ||
The use case is the problems where an optimization is some intermediate step | ||
that has to be run repeatedly. | ||
|
||
## Basic usage | ||
|
||
```julia | ||
julia> function rosenbrock!(x::AbstractVector, g::AbstractVector; b=100) | ||
f = zero(eltype(g)) | ||
fill!(g, 0) | ||
inds = eachindex(x, g) | ||
for i in 2:last(inds) | ||
f += (1 - x[i-1])^2 + b * (x[i] - x[i-1]^2)^2 | ||
g[i-1] += 2 * (x[i-1] - 1) + 4 * b * x[i-1] * (x[i-1]^2 - x[i]) | ||
g[i] += 2 * b * (x[i] - x[i-1]^2) | ||
end | ||
return f, g | ||
end | ||
|
||
julia> let x0 = zeros(2) | ||
opt = BFGS(x0) | ||
optresult = optimize!(rosenbrock!, opt, x0) | ||
optresult.argument | ||
end | ||
2-element Vector{Float64}: | ||
0.9999999998907124 | ||
0.9999999998080589 | ||
``` |
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
export DescentMethod, CoreMethod, Wrapper | ||
export AbstractOptBuffer, OptBuffer, Wrapper | ||
|
||
abstract type DescentMethod end | ||
abstract type AbstractOptBuffer end | ||
|
||
abstract type CoreMethod <: DescentMethod end | ||
abstract type OptBuffer <: AbstractOptBuffer end | ||
|
||
abstract type Wrapper <: DescentMethod end | ||
abstract type Wrapper <: AbstractOptBuffer end | ||
|
||
const OptLogLevel = LogLevel(-10) | ||
const LSLogLevel = LogLevel(-20) |
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
Oops, something went wrong.
189c1ea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
Release notes:
First release of the package. Included optimization methods:
189c1ea
There was a problem hiding this comment.
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/50898
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: