-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release argmin v0.7.0 and argmin-math v0.2.0
- Loading branch information
Showing
4 changed files
with
81 additions
and
4 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "argmin-math" | ||
version = "0.1.0" | ||
version = "0.2.0" | ||
authors = ["Stefan Kroboth <[email protected]>"] | ||
edition = "2021" | ||
license = "MIT OR Apache-2.0" | ||
|
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,6 +1,6 @@ | ||
[package] | ||
name = "argmin" | ||
version = "0.6.0" | ||
version = "0.7.0" | ||
authors = ["Stefan Kroboth <[email protected]>"] | ||
edition = "2021" | ||
license = "MIT OR Apache-2.0" | ||
|
@@ -22,7 +22,7 @@ num-traits = { version = "0.2" } | |
rand = { version = "0.8.5" } | ||
rand_xoshiro = { version = "0.6.0" } | ||
thiserror = "1.0" | ||
argmin-math = { path = "../argmin-math", version = "0.1.0", default-features = false, features = ["primitives"] } | ||
argmin-math = { path = "../argmin-math", version = "0.2", default-features = false, features = ["primitives"] } | ||
# optional | ||
bincode = { version = "1.3.3", optional = true } | ||
ctrlc = { version = "3.1.2", optional = true } | ||
|
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,62 @@ | ||
+++ | ||
title = "argmin 0.7.0 and argmin-math 0.2.0 released" | ||
description = "" | ||
date = 2022-08-28T00:00:00+00:00 | ||
updated = 2022-08-28T00:00:00+00:00 | ||
draft = true | ||
template = "blog/page.html" | ||
|
||
[taxonomies] | ||
authors = ["Stefan Kroboth"] | ||
|
||
[extra] | ||
+++ | ||
|
||
> <b>argmin</b> offers a range of numerical optimization methods in Rust. | ||
In the previous release I unfortunately accidentially removed the possibility to turn off building without the `ndarray-linalg` dependency when using the `ndarray` backend in argmin-math. | ||
`ndarray-linalg` is essentially only needed for the matrix inverse, which only a few solvers require. | ||
However, it links against a BLAS which can cause problems that are particularly frustrating when it is not even needed. | ||
|
||
In this release, this possibility is added again. | ||
Each `ndarray`-related feature now also comes with a `*-nolinalg*` version which turns off building `ndarray-linalg`. | ||
Note that this will not implement `ArgminInv` for the `ndarray` backend and therefore certain solvers (for instance the Newton method) will not work with `ndarray` types. | ||
More details can be found in the [argmin-math docs](https://docs.rs/argmin-math/). | ||
|
||
I was unsure if this fix was a breaking change because of the way argmin depends on argmin-math, therefore I decided to go ahead and release version 0.7 of argmin and version 0.2 of argmin-math just to be safe. | ||
|
||
This also gave me the chance to release other (some of them definitely breaking) changes which were made recently. | ||
|
||
The change with the most impact was made by [@vbkaisetsu](https://github.com/vbkaisetsu) (Thanks!) who added [L1 regularization](L1-regularization) to L-BFGS (also known as OWL-QN). | ||
This method can be enabled with the `with_l1_regularization` method of `LBFGS` which takes the non-negative L1 coefficient as input. | ||
|
||
```rust | ||
let solver = LBFGS::new(linesearch, 7).with_l1_regularization(1.0)?; | ||
``` | ||
|
||
[@vbkaisetsu](https://github.com/vbkaisetsu) also provided an [example](https://github.com/argmin-rs/argmin/blob/main/argmin/examples/owl_qn.rs). | ||
|
||
A minor downside of this addition is that the number of trait bounds on the types used in L-BFGS increased. | ||
If you are using one of the default backends, this is unlikely to affect you though. | ||
|
||
The OWL-QN implementation required changes and additions to `argmin-math`, for instance the traits `ArgminSignum` and `ArgminL1Norm`. | ||
|
||
To make the already existing `ArgminNorm` trait (which computes the L2 norm) more consistent with `ArgminL1Norm`, I renamed it to `ArgminL2Norm`. | ||
|
||
And while they were at it, [@vbkaisetsu](https://github.com/vbkaisetsu) also fixed wrong type alias names in some of the examples. | ||
|
||
Shortly after releasing the previous version [@renato145](https://github.com/renato145) reported [a bug](https://github.com/argmin-rs/argmin/issues/246) in the `Dogleg` method which I fixed. | ||
Thanks again for reporting! | ||
|
||
|
||
Overall, updating argmin from 0.6 to 0.7 should be fairly straight forward in most cases. | ||
|
||
|
||
<br> | ||
<script async defer src="https://buttons.github.io/buttons.js"></script> | ||
<p align="center"> | ||
<a class="github-button" href="https://github.com/argmin-rs/argmin" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star argmin-rs/argmin on GitHub">Star</a> | ||
<a class="github-button" href="https://github.com/argmin-rs/argmin/subscription" data-icon="octicon-eye" data-size="large" data-show-count="true" aria-label="Watch argmin-rs/argmin on GitHub">Watch</a> | ||
<a class="github-button" href="https://github.com/argmin-rs/argmin/fork" data-icon="octicon-repo-forked" data-size="large" data-show-count="true" aria-label="Fork argmin-rs/argmin on GitHub">Fork</a> | ||
<a class="github-button" href="https://github.com/sponsors/stefan-k" data-icon="octicon-heart" data-size="large" aria-label="Sponsor @stefan-k on GitHub">Sponsor</a> | ||
</p> |