Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matthias Mayr
limbo
Commits
d3dee123
Commit
d3dee123
authored
Nov 22, 2016
by
Konstantinos Chatzilygeroudis
Browse files
Fix for cmaes
parent
0fb13c04
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/limbo/opt/cmaes.hpp
View file @
d3dee123
...
...
@@ -115,8 +115,6 @@ namespace limbo {
CMAParameters
<>
cmaparams
(
x0
,
sigma
);
_set_common_params
(
cmaparams
,
dim
);
// used by restart I think
cmaparams
.
set_x0
(
-
1.0
,
1.0
);
// the optimization itself
CMASolutions
cmasols
=
cmaes
<>
(
f_cmaes
,
cmaparams
);
...
...
@@ -143,8 +141,6 @@ namespace limbo {
// -1 for automatically decided lambda, 0 is for random seeding of the internal generator.
CMAParameters
<
GenoPheno
<
pwqBoundStrategy
>>
cmaparams
(
dim
,
&
x0
.
front
(),
sigma
,
-
1
,
0
,
gp
);
_set_common_params
(
cmaparams
,
dim
);
// used by restart I think
cmaparams
.
set_x0
(
0
,
1.0
);
// the optimization itself
CMASolutions
cmasols
=
cmaes
<
GenoPheno
<
pwqBoundStrategy
>>
(
f_cmaes
,
cmaparams
);
...
...
src/limbo/tools/random_generator.hpp
View file @
d3dee123
...
...
@@ -122,7 +122,7 @@ namespace limbo {
/// - we use a C++11 random number generator
Eigen
::
VectorXd
random_vector_unbounded
(
int
size
)
{
static
rgen_gauss_t
rgen
(
0.0
,
10
0
.0
);
static
rgen_gauss_t
rgen
(
0.0
,
10.0
);
Eigen
::
VectorXd
res
(
size
);
for
(
int
i
=
0
;
i
<
size
;
++
i
)
res
[
i
]
=
rgen
.
rand
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment