Skip to content

Commit

Permalink
Replace steepest descent with generalized line-search
Browse files Browse the repository at this point in the history
- optimal-steepest: replace fixed-step steepest with fixed step-size.
- optimal-steepest: replace backtracking steepest with backtracking line-search.
- optimal-steepest: rename `start*` methods to `build*`.
  The latter is more familiar,
  being from the builder-pattern.
- optimal-steepest: add step-direction and initial step-size components.
- optimal-steepest: remove deceptive optimizer methods,
  now that these optimizers contain components with their own stats.
  Methods returning `Option` would return `None` while a component is running,
  even if they could return `Some` from that component.
  A plethora of traits would be required,
  and need to be implemented on components,
  to properly implement those methods.
- optimal-steepest: make state `enum`s public.
  Without optimizer methods providing state information,
  users need more access to state details
  to get that information.
- optimal-steepest: simplify states
  using `enum` fields
  instead of structs.
- optimal-steepest: remove redundant states.
- optimal-steepest: fix potentially invalid usage with `build_from`
  by taking `point` instead of `state`,
  now that users have more access to `state`.
- optimal-steepest: add prelude.
- Rename `optimal-steepest` to `optimal-linesearch`.
  • Loading branch information
justinlovinger committed Oct 26, 2023
1 parent e09876c commit c214474
Show file tree
Hide file tree
Showing 22 changed files with 1,476 additions and 1,420 deletions.
2 changes: 1 addition & 1 deletion .hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cargo readme -r derive-num-bounded -o README.md
cargo readme -r optimal-binary -o README.md
cargo readme -r optimal-core -o README.md
cargo readme -r optimal-pbil -o README.md
cargo readme -r optimal-steepest -o README.md
cargo readme -r optimal-linesearch -o README.md

git add README.md
git add **/README.md
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ members = [
"optimal-binary",
"optimal-core",
"optimal-pbil",
"optimal-steepest",
"optimal-linesearch",
]

[package]
Expand All @@ -25,7 +25,7 @@ github = { repository = "justinlovinger/optimal-rs", workflow = "build" }
[dependencies]
optimal-core = { path = "optimal-core", version = "0.0.0" }
optimal-pbil = { path = "optimal-pbil", version = "0.0.0" }
optimal-steepest = { path = "optimal-steepest", version = "0.0.0" }
optimal-linesearch = { path = "optimal-linesearch", version = "0.0.0" }
rand_xoshiro = "0.6.0"

[dev-dependencies]
10 changes: 5 additions & 5 deletions optimal-steepest/Cargo.toml → optimal-linesearch/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "optimal-steepest"
name = "optimal-linesearch"
version = "0.0.0"
edition = "2021"
authors = ["Justin Lovinger"]
description = "Implementation of steepest descent optimizers"
repository = "https://github.com/justinlovinger/optimal-rs/tree/master/optimal-steepest"
description = "Implementation of line-search optimizers"
repository = "https://github.com/justinlovinger/optimal-rs/tree/master/optimal-linesearch"
readme = "README.md"
keywords = ["optimization", "steepest-descent", "line-search"]
keywords = ["optimization", "gradient-descent", "line-search"]
categories = ["science", "mathematics"]
license = "MIT"

Expand All @@ -24,7 +24,7 @@ num-traits = "0.2.16"
optimal-core = { path = "../optimal-core", version = "0.0.0" }
rand = "0.8.5"
replace_with = "0.1.7"
serde = { version = "1.0.185", features = ["derive"], optional = true }
serde = { version = "1.0.185", features = ["derive", "rc"], optional = true }
streaming-iterator = "0.1.9"
thiserror = "1.0.47"

Expand Down
7 changes: 5 additions & 2 deletions optimal-steepest/README.md → optimal-linesearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ Expect frequent updates to the repository
with breaking changes
and infrequent releases.

# optimal-steepest
# optimal-linesearch

Steepest descent optimizers.
Line-search optimizers.

Fixed step-size is included
for being line-search-like.

License: MIT
File renamed without changes.
Loading

0 comments on commit c214474

Please sign in to comment.