-
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #627 from SciML/Vaibhavdixit02-patch-3
Create polyopt.md
- Loading branch information
Showing
3 changed files
with
31 additions
and
0 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
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,28 @@ | ||
# OptimizationPolyalgorithms.jl | ||
|
||
OptimizationPolyalgorithms.jl is a package for collecting polyalgorithms formed by fusing popular optimization solvers of different characteristics. | ||
|
||
## Installation: OptimizationPolyalgorithms | ||
|
||
To use this package, install the OptimizationPolyalgorithms package: | ||
|
||
```julia | ||
import Pkg; | ||
Pkg.add("OptimizationPolyalgorithms"); | ||
``` | ||
## Algorithms | ||
|
||
Right now we support the following polyalgorithms. | ||
|
||
`PolyOpt`: Runs Adam followed by BFGS for an equal number of iterations. This is useful in scientific machine learning use cases, by exploring the loss surface with the stochastic optimizer and converging to the minima faster with BFGS. | ||
|
||
```@example polyopt | ||
using Optimization, OptimizationPolyalgorithms | ||
rosenbrock(x, p) = (p[1] - x[1])^2 + p[2] * (x[2] - x[1]^2)^2 | ||
x0 = zeros(2) | ||
_p = [1.0, 100.0] | ||
optprob = OptimizationFunction(rosenbrock, Optimization.AutoForwardDiff()) | ||
prob = OptimizationProblem(optprob, x0, _p) | ||
sol = Optimization.solve(prob, PolyOpt(), maxiters = 1000) | ||
``` |