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
8cc97874
Commit
8cc97874
authored
May 15, 2016
by
Konstantinos Chatzilygeroudis
Browse files
Fix for HP opt
parent
980b587e
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/limbo/bayes_opt/boptimizer.hpp
View file @
8cc97874
...
...
@@ -116,7 +116,7 @@ namespace limbo {
_model
.
add_sample
(
this
->
_samples
.
back
(),
this
->
_observations
.
back
(),
Params
::
bayes_opt_boptimizer
::
noise
());
}
if
(
Params
::
bayes_opt_boptimizer
::
hp_period
()
!=
-
1
if
(
Params
::
bayes_opt_boptimizer
::
hp_period
()
>
0
&&
this
->
_current_iteration
%
Params
::
bayes_opt_boptimizer
::
hp_period
()
==
0
)
_model
.
optimize_hyperparams
();
...
...
src/limbo/model/gp.hpp
View file @
8cc97874
...
...
@@ -39,12 +39,11 @@ namespace limbo {
assert
(
samples
.
size
()
!=
0
);
assert
(
observations
.
size
()
!=
0
);
assert
(
samples
.
size
()
==
observations
.
size
());
assert
(
bl_samples
.
size
()
==
noises_bl
.
size
());
assert
(
bl_samples
.
size
()
==
(
unsigned
int
)
noises_bl
.
size
());
_dim_in
=
samples
[
0
].
size
();
_kernel_function
=
KernelFunction
(
_dim_in
);
// the cost of building a functor should be relatively low
_dim_out
=
observations
[
0
].
size
();
_mean_function
=
MeanFunction
(
_dim_out
);
// the cost of building a functor should be relatively low
...
...
@@ -69,7 +68,8 @@ namespace limbo {
}
/// Do not forget to call this if you use hyper-prameters optimization!!
void
optimize_hyperparams
()
{
void
optimize_hyperparams
()
{
HyperParamsOptimizer
()(
*
this
);
}
...
...
@@ -81,13 +81,15 @@ namespace limbo {
if
(
_bl_samples
.
empty
())
{
_dim_in
=
sample
.
size
();
_kernel_function
=
KernelFunction
(
_dim_in
);
// the cost of building a functor should be relatively low
}
else
{
}
else
{
assert
(
sample
.
size
()
==
_dim_in
);
}
_dim_out
=
observation
.
size
();
_mean_function
=
MeanFunction
(
_dim_out
);
// the cost of building a functor should be relatively low
}
else
{
}
else
{
assert
(
sample
.
size
()
==
_dim_in
);
assert
(
observation
.
size
()
==
_dim_out
);
}
...
...
@@ -116,7 +118,8 @@ namespace limbo {
if
(
_samples
.
empty
()
&&
_bl_samples
.
empty
())
{
_dim_in
=
bl_sample
.
size
();
_kernel_function
=
KernelFunction
(
_dim_in
);
// the cost of building a functor should be relatively low
}
else
{
}
else
{
assert
(
bl_sample
.
size
()
==
_dim_in
);
}
...
...
@@ -383,7 +386,7 @@ namespace limbo {
_inv_bl_kernel
.
block
(
_samples
.
size
(),
0
,
_bl_samples
.
size
(),
_samples
.
size
())
=
_inv_bl_kernel
.
block
(
0
,
_samples
.
size
(),
_samples
.
size
(),
_bl_samples
.
size
())
_bl_samples
.
size
())
.
transpose
();
_inv_bl_kernel
.
block
(
_samples
.
size
(),
_samples
.
size
(),
_bl_samples
.
size
(),
_bl_samples
.
size
())
...
...
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