Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
MagiFeeney authored Jul 4, 2022
1 parent fd69096 commit c23af5e
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,47 +72,35 @@ Use a simple line of code for unconstrained optimizer
optimizer.plot()
```
we can visualize the 2D curve with iterated sequence. Such that
+--------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
<img src="https://github.com/MagiFeeney/MagiOPT/blob/859f80525d66a1d6799024721b8fb5a508a9ae6f/MagiOPT/examples/sd/Figure_sd_1.png">
+--------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+

+--------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
| <img src="https://github.com/MagiFeeney/MagiOPT/blob/859f80525d66a1d6799024721b8fb5a508a9ae6f/MagiOPT/examples/sd/Figure_sd_1.png"> |


| <img src="https://github.com/MagiFeeney/MagiOPT/blob/859f80525d66a1d6799024721b8fb5a508a9ae6f/MagiOPT/examples/sd/Figure_sd_2.png"> | <img src="https://github.com/MagiFeeney/MagiOPT/blob/859f80525d66a1d6799024721b8fb5a508a9ae6f/MagiOPT/examples/sd/Figure_sd_3.png"> |
+--------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+

Or use
```python
optimizer = optim.Penalty(..., plot=True)
```
we can visualize the function and sequence of each inner iteration with the 3D surface with iterated sequence, and its contour with iterated sequence.

+--------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+

| <img src="https://github.com/MagiFeeney/MagiOPT/blob/859f80525d66a1d6799024721b8fb5a508a9ae6f/MagiOPT/examples/penalty/Figure_1.png"> | <img src="https://github.com/MagiFeeney/MagiOPT/blob/859f80525d66a1d6799024721b8fb5a508a9ae6f/MagiOPT/examples/penalty/Figure_2.png"> |
+--------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+

+--------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
| <img src="https://github.com/MagiFeeney/MagiOPT/blob/859f80525d66a1d6799024721b8fb5a508a9ae6f/MagiOPT/examples/penalty/Figure_3.png"> | <img src="https://github.com/MagiFeeney/MagiOPT/blob/859f80525d66a1d6799024721b8fb5a508a9ae6f/MagiOPT/examples/penalty/Figure_4.png"> |
+--------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+

+--------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
| <img src="https://github.com/MagiFeeney/MagiOPT/blob/859f80525d66a1d6799024721b8fb5a508a9ae6f/MagiOPT/examples/penalty/Figure_5.png"> | <img src="https://github.com/MagiFeeney/MagiOPT/blob/859f80525d66a1d6799024721b8fb5a508a9ae6f/MagiOPT/examples/penalty/Figure_6.png"> |
+--------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+

+--------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
| <img src="https://github.com/MagiFeeney/MagiOPT/blob/859f80525d66a1d6799024721b8fb5a508a9ae6f/MagiOPT/examples/penalty/Figure_7.png"> | <img src="https://github.com/MagiFeeney/MagiOPT/blob/859f80525d66a1d6799024721b8fb5a508a9ae6f/MagiOPT/examples/penalty/Figure_8.png"> |
+--------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+

+--------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
| <img src="https://github.com/MagiFeeney/MagiOPT/blob/859f80525d66a1d6799024721b8fb5a508a9ae6f/MagiOPT/examples/penalty/Figure_9.png"> | <img src="https://github.com/MagiFeeney/MagiOPT/blob/859f80525d66a1d6799024721b8fb5a508a9ae6f/MagiOPT/examples/penalty/Figure_10.png"> |
+--------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+

+--------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
| <img src="https://github.com/MagiFeeney/MagiOPT/blob/859f80525d66a1d6799024721b8fb5a508a9ae6f/MagiOPT/examples/penalty/Figure_11.png"> | <img src="https://github.com/MagiFeeney/MagiOPT/blob/859f80525d66a1d6799024721b8fb5a508a9ae6f/MagiOPT/examples/penalty/Figure_12.png"> |
+--------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+

## Reminder
- Majority of algorithms are sensitive to initial point; choosing properly will save a lot of your effort
- Due to ill-conditioned situation, constrained optimizer may need you to trial-and-error
- Barzilai-Borwein method is not stable for non-qudratic problem, however, you can still infer path through an intermediate visualization
- The behavior of Barzilai-Borwein method is not stable for non-qudratic problem, however, you can still infer path through an intermediate visualization
- You can extract the sequence easily by
```python
optimization.sequence
Expand Down

0 comments on commit c23af5e

Please sign in to comment.