Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matthias Mayr
limbo
Commits
95967d51
Commit
95967d51
authored
Jul 14, 2016
by
Konstantinos Chatzilygeroudis
Committed by
GitHub
Jul 14, 2016
Browse files
Merge pull request #148 from resibots/typos_benchmark
fix typos in names of the benchmark function
parents
9318018c
d0211fdf
Changes
13
Hide whitespace changes
Inline
Side-by-side
src/benchmarks/bayesopt/hp_opt.cpp
View file @
95967d51
...
...
@@ -48,12 +48,12 @@ int main(int nargs, char* args[])
strcpy
(
par
.
kernel
.
name
,
"kSEARD"
);
benchmark
<
BraninNormalized
>
(
par
,
"branin"
);
benchmark
<
Hartman6
>
(
par
,
"hartman6"
);
benchmark
<
Hartman3
>
(
par
,
"hartman3"
);
benchmark
<
Hartman
n
6
>
(
par
,
"hartman
n
6"
);
benchmark
<
Hartman
n
3
>
(
par
,
"hartman
n
3"
);
benchmark
<
Rastrigin
>
(
par
,
"rastrigin"
);
benchmark
<
Sphere
>
(
par
,
"sphere"
);
benchmark
<
Ellipsoid
>
(
par
,
"ellipsoid"
);
benchmark
<
Gold
e
nPrice
>
(
par
,
"gold
e
nprice"
);
benchmark
<
Gold
stei
nPrice
>
(
par
,
"gold
stei
nprice"
);
benchmark
<
SixHumpCamel
>
(
par
,
"sixhumpcamel"
);
return
0
;
...
...
src/benchmarks/bayesopt/simple.cpp
View file @
95967d51
...
...
@@ -48,12 +48,12 @@ int main(int nargs, char* args[])
strcpy
(
par
.
kernel
.
name
,
"kMaternISO5"
);
benchmark
<
BraninNormalized
>
(
par
,
"branin"
);
benchmark
<
Hartman6
>
(
par
,
"hartman6"
);
benchmark
<
Hartman3
>
(
par
,
"hartman3"
);
benchmark
<
Hartman
n
6
>
(
par
,
"hartman
n
6"
);
benchmark
<
Hartman
n
3
>
(
par
,
"hartman
n
3"
);
benchmark
<
Rastrigin
>
(
par
,
"rastrigin"
);
benchmark
<
Sphere
>
(
par
,
"sphere"
);
benchmark
<
Ellipsoid
>
(
par
,
"ellipsoid"
);
benchmark
<
Gold
e
nPrice
>
(
par
,
"gold
e
nprice"
);
benchmark
<
Gold
stei
nPrice
>
(
par
,
"gold
stei
nprice"
);
benchmark
<
SixHumpCamel
>
(
par
,
"sixhumpcamel"
);
return
0
;
...
...
src/benchmarks/bayesopt/testfunctions.hpp
View file @
95967d51
...
...
@@ -138,7 +138,7 @@ struct Rastrigin {
};
// see : http://www.sfu.ca/~ssurjano/hart3.html
struct
Hartman3
{
struct
Hartman
n
3
{
static
constexpr
size_t
dim_in
=
3
;
static
constexpr
size_t
dim_out
=
1
;
...
...
@@ -172,7 +172,7 @@ struct Hartman3 {
};
// see : http://www.sfu.ca/~ssurjano/hart6.html
struct
Hartman6
{
struct
Hartman
n
6
{
static
constexpr
size_t
dim_in
=
6
;
static
constexpr
size_t
dim_out
=
1
;
...
...
@@ -210,7 +210,7 @@ struct Hartman6 {
// see : http://www.sfu.ca/~ssurjano/goldpr.html
// (with ln, as suggested in Jones et al.)
struct
Gold
e
nPrice
{
struct
Gold
stei
nPrice
{
static
constexpr
size_t
dim_in
=
2
;
static
constexpr
size_t
dim_out
=
1
;
...
...
src/benchmarks/limbo/hp_opt.cpp
View file @
95967d51
...
...
@@ -105,12 +105,12 @@ int main()
typedef
bayes_opt
::
BOptimizer
<
Params
,
modelfun
<
GP_t
>
,
initfun
<
Init_t
>
,
acquifun
<
Acqui_t
>
,
acquiopt
<
AcquiOpt_t
>
,
statsfun
<
Stat_t
>
,
stopcrit
<
Stop_t
>>
Opt_t
;
benchmark
<
Opt_t
,
BraninNormalized
>
(
"branin"
);
benchmark
<
Opt_t
,
Hartman6
>
(
"hartman6"
);
benchmark
<
Opt_t
,
Hartman3
>
(
"hartman3"
);
benchmark
<
Opt_t
,
Hartman
n
6
>
(
"hartman
n
6"
);
benchmark
<
Opt_t
,
Hartman
n
3
>
(
"hartman
n
3"
);
benchmark
<
Opt_t
,
Rastrigin
>
(
"rastrigin"
);
benchmark
<
Opt_t
,
Sphere
>
(
"sphere"
);
benchmark
<
Opt_t
,
Ellipsoid
>
(
"ellipsoid"
);
benchmark
<
Opt_t
,
Gold
e
nPrice
>
(
"gold
e
nprice"
);
benchmark
<
Opt_t
,
Gold
stei
nPrice
>
(
"gold
stei
nprice"
);
benchmark
<
Opt_t
,
SixHumpCamel
>
(
"sixhumpcamel"
);
return
0
;
...
...
src/benchmarks/limbo/simple.cpp
View file @
95967d51
...
...
@@ -80,7 +80,7 @@ int main()
{
srand
(
time
(
NULL
));
typedef
kernel
::
MaternFiveHal
f
s
<
Params
>
Kernel_t
;
typedef
kernel
::
MaternFiveHal
ve
s
<
Params
>
Kernel_t
;
typedef
opt
::
Chained
<
Params
,
opt
::
NLOptNoGrad
<
DirectParams
,
nlopt
::
GN_DIRECT_L
>
,
opt
::
NLOptNoGrad
<
BobyqaParams
,
nlopt
::
LN_BOBYQA
>>
AcquiOpt_t
;
typedef
boost
::
fusion
::
vector
<
stop
::
MaxIterations
<
Params
>>
Stop_t
;
// typedef mean_functions::MeanFunctionARD<Params, mean_functions::MeanData<Params>> Mean_t;
...
...
@@ -93,12 +93,12 @@ int main()
typedef
bayes_opt
::
BOptimizer
<
Params
,
modelfun
<
GP_t
>
,
initfun
<
Init_t
>
,
acquifun
<
Acqui_t
>
,
acquiopt
<
AcquiOpt_t
>
,
statsfun
<
Stat_t
>
,
stopcrit
<
Stop_t
>>
Opt_t
;
benchmark
<
Opt_t
,
BraninNormalized
>
(
"branin"
);
benchmark
<
Opt_t
,
Hartman6
>
(
"hartman6"
);
benchmark
<
Opt_t
,
Hartman3
>
(
"hartman3"
);
benchmark
<
Opt_t
,
Hartman
n
6
>
(
"hartman
n
6"
);
benchmark
<
Opt_t
,
Hartman
n
3
>
(
"hartman
n
3"
);
benchmark
<
Opt_t
,
Rastrigin
>
(
"rastrigin"
);
benchmark
<
Opt_t
,
Sphere
>
(
"sphere"
);
benchmark
<
Opt_t
,
Ellipsoid
>
(
"ellipsoid"
);
benchmark
<
Opt_t
,
Gold
e
nPrice
>
(
"gold
e
nprice"
);
benchmark
<
Opt_t
,
Gold
stei
nPrice
>
(
"gold
stei
nprice"
);
benchmark
<
Opt_t
,
SixHumpCamel
>
(
"sixhumpcamel"
);
return
0
;
...
...
src/benchmarks/limbo/testfunctions.hpp
View file @
95967d51
...
...
@@ -110,7 +110,7 @@ struct Rastrigin {
};
// see : http://www.sfu.ca/~ssurjano/hart3.html
struct
Hartman3
{
struct
Hartman
n
3
{
static
constexpr
size_t
dim_in
=
3
;
static
constexpr
size_t
dim_out
=
1
;
...
...
@@ -144,7 +144,7 @@ struct Hartman3 {
};
// see : http://www.sfu.ca/~ssurjano/hart6.html
struct
Hartman6
{
struct
Hartman
n
6
{
static
constexpr
size_t
dim_in
=
6
;
static
constexpr
size_t
dim_out
=
1
;
...
...
@@ -182,7 +182,7 @@ struct Hartman6 {
// see : http://www.sfu.ca/~ssurjano/goldpr.html
// (with ln, as suggested in Jones et al.)
struct
Gold
e
nPrice
{
struct
Gold
stei
nPrice
{
static
constexpr
size_t
dim_in
=
2
;
static
constexpr
size_t
dim_out
=
1
;
...
...
src/examples/mono_dim.cpp
View file @
95967d51
...
...
@@ -67,7 +67,7 @@ struct fit_eval {
int
main
()
{
typedef
kernel
::
MaternFiveHal
f
s
<
Params
>
Kernel_t
;
typedef
kernel
::
MaternFiveHal
ve
s
<
Params
>
Kernel_t
;
typedef
mean
::
Data
<
Params
>
Mean_t
;
typedef
model
::
GP
<
Params
,
Kernel_t
,
Mean_t
>
GP_t
;
typedef
acqui
::
UCB
<
Params
,
GP_t
>
Acqui_t
;
...
...
src/examples/obs_multi.cpp
View file @
95967d51
...
...
@@ -74,7 +74,7 @@ struct SecondElem {
int
main
()
{
typedef
kernel
::
MaternFiveHal
f
s
<
Params
>
Kernel_t
;
typedef
kernel
::
MaternFiveHal
ve
s
<
Params
>
Kernel_t
;
typedef
mean
::
Data
<
Params
>
Mean_t
;
typedef
model
::
GP
<
Params
,
Kernel_t
,
Mean_t
>
GP_t
;
typedef
acqui
::
GP_UCB
<
Params
,
GP_t
>
Acqui_t
;
...
...
src/limbo/bayes_opt/bo_base.hpp
View file @
95967d51
...
...
@@ -122,7 +122,7 @@ namespace limbo {
For Statistics, the default value is: ``boost::fusion::vector<stat::Samples<Params>, stat::AggregatedObservations<Params>, stat::ConsoleSummary<Params>>``
Example of customization:
- ``typedef kernel::MaternFiveHal
f
s<Params> Kernel_t;``
- ``typedef kernel::MaternFiveHal
ve
s<Params> Kernel_t;``
- ``typedef mean::Data<Params> Mean_t;``
- ``typedef model::GP<Params, Kernel_t, Mean_t> GP_t;``
- ``typedef acqui::UCB<Params, GP_t> Acqui_t;``
...
...
src/limbo/kernel/matern_five_halfs.hpp
View file @
95967d51
...
...
@@ -38,8 +38,8 @@ namespace limbo {
\endrst
*/
template
<
typename
Params
>
struct
MaternFiveHal
f
s
{
MaternFiveHal
f
s
(
size_t
dim
=
1
)
{}
struct
MaternFiveHal
ve
s
{
MaternFiveHal
ve
s
(
size_t
dim
=
1
)
{}
double
operator
()(
const
Eigen
::
VectorXd
&
v1
,
const
Eigen
::
VectorXd
&
v2
)
const
{
...
...
src/limbo/kernel/matern_three_halfs.hpp
View file @
95967d51
...
...
@@ -37,8 +37,8 @@ namespace limbo {
\endrst
*/
template
<
typename
Params
>
struct
MaternThreeHal
f
s
{
MaternThreeHal
f
s
(
size_t
dim
=
1
)
{}
struct
MaternThreeHal
ve
s
{
MaternThreeHal
ve
s
(
size_t
dim
=
1
)
{}
double
operator
()(
const
Eigen
::
VectorXd
&
v1
,
const
Eigen
::
VectorXd
&
v2
)
const
{
...
...
src/tests/create_all_combinations_test.py
View file @
95967d51
...
...
@@ -6,11 +6,11 @@ import os
def
create
(
bld
):
kernels
=
[
'Exp'
,
'MaternThreeHal
f
s'
,
'MaternFiveHal
f
s'
,
'SquaredExpARD'
]
kernels
=
[
'Exp'
,
'MaternThreeHal
ve
s'
,
'MaternFiveHal
ve
s'
,
'SquaredExpARD'
]
kernel_incompatibility
=
{}
kernel_incompatibility
[
'Exp'
]
=
[
'KernelLFOpt'
,
'KernelMeanLFOpt'
,
'MeanLFOpt'
]
kernel_incompatibility
[
'MaternThreeHal
f
s'
]
=
[
'KernelLFOpt'
,
'KernelMeanLFOpt'
,
'MeanLFOpt'
]
kernel_incompatibility
[
'MaternFiveHal
f
s'
]
=
[
'KernelLFOpt'
,
'KernelMeanLFOpt'
,
'MeanLFOpt'
]
kernel_incompatibility
[
'MaternThreeHal
ve
s'
]
=
[
'KernelLFOpt'
,
'KernelMeanLFOpt'
,
'MeanLFOpt'
]
kernel_incompatibility
[
'MaternFiveHal
ve
s'
]
=
[
'KernelLFOpt'
,
'KernelMeanLFOpt'
,
'MeanLFOpt'
]
means
=
[
'NullFunction'
,
'Constant'
,
'Data'
,
'FunctionARD'
]
mean_additional_params
=
{}
...
...
src/tests/test_gp.cpp
View file @
95967d51
...
...
@@ -57,7 +57,7 @@ BOOST_AUTO_TEST_CASE(test_gp_dim)
{
using
namespace
limbo
;
typedef
kernel
::
MaternFiveHal
f
s
<
Params
>
KF_t
;
typedef
kernel
::
MaternFiveHal
ve
s
<
Params
>
KF_t
;
typedef
mean
::
Constant
<
Params
>
Mean_t
;
typedef
model
::
GP
<
Params
,
KF_t
,
Mean_t
>
GP_t
;
...
...
@@ -82,7 +82,7 @@ BOOST_AUTO_TEST_CASE(test_gp)
{
using
namespace
limbo
;
typedef
kernel
::
MaternFiveHal
f
s
<
Params
>
KF_t
;
typedef
kernel
::
MaternFiveHal
ve
s
<
Params
>
KF_t
;
typedef
mean
::
Constant
<
Params
>
Mean_t
;
typedef
model
::
GP
<
Params
,
KF_t
,
Mean_t
>
GP_t
;
...
...
@@ -124,7 +124,7 @@ BOOST_AUTO_TEST_CASE(test_gp_bw_inversion)
size_t
N
=
1000
;
size_t
failures
=
0
;
typedef
kernel
::
MaternFiveHal
f
s
<
Params
>
KF_t
;
typedef
kernel
::
MaternFiveHal
ve
s
<
Params
>
KF_t
;
typedef
mean
::
Constant
<
Params
>
Mean_t
;
typedef
model
::
GP
<
Params
,
KF_t
,
Mean_t
>
GP_t
;
...
...
@@ -219,7 +219,7 @@ BOOST_AUTO_TEST_CASE(test_gp_blacklist)
{
using
namespace
limbo
;
typedef
kernel
::
MaternFiveHal
f
s
<
Params
>
KF_t
;
typedef
kernel
::
MaternFiveHal
ve
s
<
Params
>
KF_t
;
typedef
mean
::
Constant
<
Params
>
Mean_t
;
typedef
model
::
GP
<
Params
,
KF_t
,
Mean_t
>
GP_t
;
...
...
@@ -300,8 +300,8 @@ BOOST_AUTO_TEST_CASE(test_gp_init_variance)
};
};
// MaternThreeHal
f
s
typedef
model
::
GP
<
Params
,
kernel
::
MaternThreeHal
f
s
<
Parameters
>
,
mean
::
Constant
<
Params
>>
GP1_t
;
// MaternThreeHal
ve
s
typedef
model
::
GP
<
Params
,
kernel
::
MaternThreeHal
ve
s
<
Parameters
>
,
mean
::
Constant
<
Params
>>
GP1_t
;
GP1_t
gp1
(
1
,
1
);
...
...
@@ -309,8 +309,8 @@ BOOST_AUTO_TEST_CASE(test_gp_init_variance)
BOOST_CHECK_CLOSE
(
sigma
,
10.0
,
1e-5
);
// MaternFiveHal
f
s
typedef
model
::
GP
<
Params
,
kernel
::
MaternFiveHal
f
s
<
Parameters
>
,
mean
::
Constant
<
Params
>>
GP2_t
;
// MaternFiveHal
ve
s
typedef
model
::
GP
<
Params
,
kernel
::
MaternFiveHal
ve
s
<
Parameters
>
,
mean
::
Constant
<
Params
>>
GP2_t
;
GP2_t
gp2
(
1
,
1
);
...
...
Write
Preview
Supports
Markdown
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