@@ -10,19 +10,18 @@ theme: custom
10
10
==================================================================================== -->
11
11
<!-- paginate: false -->
12
12
13
- ## Installation
14
13
15
- We assume you have done the following:
14
+ ### Installation
16
15
16
+ We assume you have done the following: Installed [ miniconda] ( https://docs.conda.io/en/latest/miniconda.html ) and
17
17
``` console
18
18
git clone https://github.com/OpenSourceEconomics/scipy-estimagic.git
19
19
cd scipy-estimagic
20
20
conda env create -f environment.yml
21
21
conda activate scipy-estimagic
22
22
```
23
-
24
- - If you haven't done so, do it now
25
- - Remember to start jupyter notebooks from within the environment
23
+ - If you haven't done so, please do so until the first practice session
24
+ - Details: https://github.com/OpenSourceEconomics/scipy-estimagic
26
25
27
26
---
28
27
@@ -100,7 +99,13 @@ University of Bonn
100
99
# Introduction to scipy.optimize
101
100
102
101
---
102
+ ### Preview of practice session
103
+
104
+ - Translate a criterion function from math to code
105
+
106
+ - Use ` scipy.optimize ` to minimize the criterion function
103
107
108
+ ---
104
109
### Example problem
105
110
106
111
<!-- _class: split -->
@@ -263,7 +268,13 @@ LinAlgError: Singular matrix
263
268
# Introduction to estimagic
264
269
265
270
---
271
+ ### Preview of practice session
266
272
273
+ - Translate a ` scipy ` optimization to ` estimagic.minimize `
274
+ - Use dictionaries instead of flat arrays as parameters in the optimization
275
+ - Plot the optimization history (criterion and parameter)
276
+
277
+ ---
267
278
### What is estimagic?
268
279
269
280
- Library for numerical optimization
@@ -670,9 +681,12 @@ array([0., 0., 0., 0., 0.])
670
681
# Choosing algorithms
671
682
672
683
---
673
- ### Preview of next exercise
684
+ ### Preview of practice session
685
+
686
+ You will get optimization problems that fail
674
687
675
- - Slide titles represent algorithm names
688
+ - Figure out why they fail
689
+ - Choose an algorithm that works
676
690
677
691
---
678
692
@@ -765,7 +779,16 @@ def sphere_ls(x):
765
779
# Practice Session 3: Play with ` algorithm ` and ` algo_options ` (20 min)
766
780
767
781
---
782
+ <!-- _class: lead -->
783
+ # Benchmarking
784
+
785
+ ---
786
+ ### Preview of practice session
768
787
788
+ - Compare different optimizers on benchmark sets
789
+ - Visualize comparison using profile and convergence plots
790
+
791
+ ---
769
792
### What is benchmarking
770
793
771
794
- Compare algorithms on functions with known optimum
@@ -889,19 +912,22 @@ em.convergence_plot(
889
912
<!-- _class: lead -->
890
913
# Break (10 min)
891
914
892
- ---
893
-
894
915
<!-- ===================================================================================
895
916
# Third hour
896
917
==================================================================================== -->
897
918
898
- <!-- _class: lead -->
899
- # Advanced Topics
900
-
901
919
---
902
920
903
921
<!-- _class: lead -->
904
922
# Bounds and Constraints
923
+ ---
924
+
925
+ ### Preview of practice session
926
+
927
+ - Solve optimization problem with
928
+ - parameter bounds
929
+ - fixed parameters
930
+ - linear constraints
905
931
906
932
---
907
933
@@ -1406,6 +1432,12 @@ array([0., 0., 0., 0., 0.])
1406
1432
<!-- _class: lead -->
1407
1433
# Scaling
1408
1434
1435
+ ---
1436
+ ### Preview of practice session
1437
+
1438
+ - Learn about badly scaled problems
1439
+ - Visualize sensitiviy of criterion w.r.t parameters
1440
+ - Use scaling to improve an optimization
1409
1441
1410
1442
---
1411
1443
@@ -1585,6 +1617,16 @@ section.split {
1585
1617
# Last hour
1586
1618
==================================================================================== -->
1587
1619
1620
+ ---
1621
+ <!-- _class: lead -->
1622
+ # JAX and JAXopt
1623
+
1624
+ ---
1625
+ ### Preview of practice session(s)
1626
+
1627
+ - Solve an optimization problem using JAX gradients
1628
+ - Solve an optimization problem using JAXopt
1629
+ - Write a batched solver using JAXopt
1588
1630
1589
1631
---
1590
1632
0 commit comments