@@ -12,6 +12,18 @@ unified interface.
12
12
13
13
#### Note: This package is still in development. The README is currently both an active documentation and a development roadmap.
14
14
15
+ ## Installation
16
+
17
+ Assuming that you already have Julia correctly installed, it suffices to import
18
+ GalacticOptim.jl in the standard way:
19
+
20
+ ``` julia
21
+ import Pkg; Pkg. add (" GalacticOptim" )
22
+ ```
23
+ The packages relevant to the basic functionality of GalacticOptim.jl will be imported
24
+ accordingly and, in most cases, you do not have to worry about the manual
25
+ installation of dependencies.
26
+
15
27
## Examples
16
28
17
29
``` julia
@@ -29,16 +41,68 @@ unified interface.
29
41
sol = solve (prob,BBO ())
30
42
```
31
43
44
+ Note that in order to use BlackBoxOptim.jl, you will have to import the package
45
+ manually if you don't have it (however, it is not necessary with Optim.jl).
46
+
47
+ A sample output of the first optimization task (with the ` NelderMead() ` algorithm)
48
+ is given below:
49
+
50
+ ``` julia
51
+ * Status: success
52
+
53
+ * Candidate solution
54
+ Final objective value: 3.525527e-09
55
+
56
+ * Found with
57
+ Algorithm: Nelder- Mead
58
+
59
+ * Convergence measures
60
+ √ (Σ (yᵢ- ȳ)²)/ n ≤ 1.0e-08
61
+
62
+ * Work counters
63
+ Seconds run: 0 (vs limit Inf )
64
+ Iterations: 60
65
+ f (x) calls: 118
66
+ ```
67
+ We can also explore other methods in a similar way:
68
+
32
69
``` julia
33
70
f = OptimizationFunction (rosenbrock, GalacticOptim. AutoForwardDiff ())
34
71
prob = OptimizationProblem (f, x0, p)
35
72
sol = solve (prob,BFGS ())
36
73
```
74
+ For instance, the above optimization task may produce the following output:
75
+
76
+ ``` julia
77
+ * Status: success
78
+
79
+ * Candidate solution
80
+ Final objective value: 7.645684e-21
81
+
82
+ * Found with
83
+ Algorithm: BFGS
84
+
85
+ * Convergence measures
86
+ | x - x' | = 3.48e-07 ≰ 0.0e+00
87
+ | x - x' | / | x' | = 3.48e-07 ≰ 0.0e+00
88
+ | f (x) - f (x' )| = 6.91e-14 ≰ 0.0e+00
89
+ | f (x) - f (x' )| / | f (x' )| = 9.03e+06 ≰ 0.0e+00
90
+ | g (x)| = 2.32e-09 ≤ 1.0e-08
91
+
92
+ * Work counters
93
+ Seconds run: 0 (vs limit Inf )
94
+ Iterations: 16
95
+ f (x) calls: 53
96
+ ∇f (x) calls: 53
97
+ ```
37
98
38
99
``` julia
39
100
prob = OptimizationProblem (f, x0, p, lb = [- 1.0 ,- 1.0 ], ub = [1.0 ,1.0 ])
40
101
sol = solve (prob, Fminbox (GradientDescent ()))
41
102
```
103
+ The examples clearly demonstrate that GalacticOptim.jl provides an intuitive
104
+ way of specifying optimization tasks and offers a relatively
105
+ easy access to a wide range of optimization algorithms.
42
106
43
107
### Automatic Differentiation Choices
44
108
@@ -77,8 +141,8 @@ solve(prob,alg;kwargs...)
77
141
78
142
Keyword arguments:
79
143
80
- - ` maxiters `
81
- - ` abstol `
82
- - ` reltol `
144
+ - ` maxiters ` (the maximum number of iterations)
145
+ - ` abstol ` (absolute tolerance)
146
+ - ` reltol ` (relative tolerance)
83
147
84
148
Output Struct:
0 commit comments