Skip to content

Commit

Permalink
Merge pull request #627 from SciML/Vaibhavdixit02-patch-3
Browse files Browse the repository at this point in the history
Create polyopt.md
  • Loading branch information
Vaibhavdixit02 authored Nov 17, 2023
2 parents 24660c5 + c386e7c commit a7ab9f1
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ OptimizationNOMAD = "2cab0595-8222-4775-b714-9828e6a9e01b"
OptimizationOptimJL = "36348300-93cb-4f02-beb5-3c3902f8871e"
OptimizationOptimisers = "42dfb2eb-d2b4-4451-abcd-913932933ac1"
OptimizationPRIMA = "72f8369c-a2ea-4298-9126-56167ce9cbc2"
OptimizationPolyalgorithms = "500b13db-7e66-49ce-bda4-eed966be6282"
OptimizationSpeedMapping = "3d669222-0d7d-4eb9-8a9f-d8528b0d9b91"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267"
Expand Down Expand Up @@ -55,6 +56,7 @@ OptimizationNOMAD = "0.1"
OptimizationOptimJL = "0.1"
OptimizationOptimisers = "0.1"
OptimizationPRIMA = "0.0.1"
OptimizationPolyalgorithms = "0.1"
OptimizationSpeedMapping = "0.1"
OrdinaryDiffEq = "6"
ReverseDiff = ">= 1.9.0"
Expand Down
1 change: 1 addition & 0 deletions docs/pages.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ pages = ["index.md",
"Optim.jl" => "optimization_packages/optim.md",
"Optimisers.jl" => "optimization_packages/optimisers.md",
"PRIMA.jl" => "optimization_packages/prima.md",
"Polyalgorithms.jl" => "optimization_packages/polyopt.md",
"QuadDIRECT.jl" => "optimization_packages/quaddirect.md",
"SpeedMapping.jl" => "optimization_packages/speedmapping.md",
],
Expand Down
28 changes: 28 additions & 0 deletions docs/src/optimization_packages/polyopt.md
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)
```

0 comments on commit a7ab9f1

Please sign in to comment.