-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptimlib_docs_settings.html
232 lines (162 loc) · 5.66 KB
/
optimlib_docs_settings.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="OptimLib: a C++ numerical optimization library.">
<meta name="author" content="Keith O'Hara">
<meta name="keywords" content="Optimization, C++, C++11, Differential Evolution, Particle Swarm Optimization, Root Finding, OpenMP, Parallel Optimization, BFGS, L-BFGS, Keith O'Hara, Economics, Econometrics, Research, NYU, New York University" />
<link rel="shortcut icon" type="image/x-icon" href="siteicon.ico">
<title>OptimLib: Settings</title>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="css/modern-business.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<!-- Additional Settings -->
<link href="css/yuxuan_settings.css" rel="stylesheet">
<!-- Syntax Highlighter -->
<script type="text/javascript" src="js/syntaxhighlighter.js"></script>
<link type="text/css" rel="stylesheet" href="css/swift_theme.css">
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-93902857-1', 'auto');
ga('send', 'pageview');
</script>
<!-- MathJax -->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
</script>
<script type="text/javascript" async
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_CHTML">
</script>
<script async defer src="https://buttons.github.io/buttons.js"></script>
<script src="js/jquery.js"></script>
<script>
$(function(){
$("#mynavbar").load("navbar.html")
$("#optimhead").load("optimlib_header.html")
$("#myfooter").load("footer.html")
});
</script>
</head>
<style>
pre {
display: inline-block;
}
</style>
<body>
<!-- Navigation -->
<div id="mynavbar"></div>
<!-- Page Content -->
<div class="container">
<!-- Page Heading/Breadcrumbs -->
<div id="optimhead"></div>
<!-- -->
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<h3 style="text-align: left;"><strong style="font-size: 120%;">OptimLib: Algorithm Settings</strong></h3>
<hr>
<p><strong>Struct definition:</strong></p>
<pre class="brush: cpp;">
struct gd_settings_t
{
// step size, or 'learning rate'
double step_size = 0.1;
// decay
bool step_decay = false;
uint_t step_decay_periods = 10;
double step_decay_val = 0.5;
// momentum parameter
double momentum_par = 0.9;
// Ada parameters
double norm_term = 10e-08;
double ada_rho = 0.9;
bool ada_max = false;
// Adam parameters
double adam_beta_1 = 0.9;
double adam_beta_2 = 0.999;
};
struct algo_settings_t
{
// general
int conv_failure_switch = 0;
int iter_max = 2000;
double err_tol = 1E-08;
bool vals_bound = false;
arma::vec lower_bounds;
arma::vec upper_bounds;
// returned by algorithms
double opt_value; // will be returned by the optimization algorithm
arma::vec zero_values; // will be returned by the root-finding method
int opt_iter;
double opt_err;
// SUMT parameter
double sumt_par_eta = 10.0;
// CG
int cg_method = 2;
double cg_restart_threshold = 0.1;
// DE
int de_n_pop = 200;
int de_n_pop_best = 6;
int de_n_gen = 1000;
int de_pmax = 4;
int de_max_fn_eval = 100000;
int de_mutation_method = 1; // 1 = rand; 2 = best
int de_check_freq = -1;
double de_par_F = 0.8;
double de_par_CR = 0.9;
double de_par_F_l = 0.1;
double de_par_F_u = 1.0;
double de_par_tau_F = 0.1;
double de_par_tau_CR = 0.1;
arma::vec de_initial_lb; // this will default to -0.5
arma::vec de_initial_ub; // this will default to 0.5
// GD
int gd_method = 0;
gd_settings_t gd_settings;
// L-BFGS
int lbfgs_par_M = 10;
// Nelder-Mead
bool nm_adaptive= true;
double nm_par_alpha = 1.0; // reflection parameter
double nm_par_beta = 0.5; // contraction parameter
double nm_par_gamma = 2.0; // expansion parameter
double nm_par_delta = 0.5; // shrinkage parameter
// PSO
bool pso_center_particle = true;
int pso_n_pop = 100;
int pso_n_gen = 1000;
int pso_inertia_method = 1; // 1 for linear decreasing between w_min and w_max; 2 for dampening
double pso_par_initial_w = 1.0;
double pso_par_w_damp = 0.99;
double pso_par_w_min = 0.10;
double pso_par_w_max = 0.99;
int pso_velocity_method = 1; // 1 for fixed; 2 for linear
double pso_par_c_cog = 2.0;
double pso_par_c_soc = 2.0;
double pso_par_initial_c_cog = 2.5;
double pso_par_final_c_cog = 0.5;
double pso_par_initial_c_soc = 0.5;
double pso_par_final_c_soc = 2.5;
arma::vec pso_initial_lb; // this will default to -0.5
arma::vec pso_initial_ub; // this will default to 0.5
};
</pre>
<hr>
</div>
</div>
</div>
<div id="myfooter"></div>
<!-- jQuery -->
<!--<script src="js/jquery.js"></script>-->
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>