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
5755523d
Commit
5755523d
authored
Oct 11, 2016
by
Konstantinos Chatzilygeroudis
Browse files
Add possibility to ignore full kernel computation in gp
parent
94f35633
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/limbo/model/gp.hpp
View file @
5755523d
...
...
@@ -77,7 +77,7 @@ namespace limbo {
/// Compute the GP from samples, observation, noise. This call needs to be explicit!
void
compute
(
const
std
::
vector
<
Eigen
::
VectorXd
>&
samples
,
const
std
::
vector
<
Eigen
::
VectorXd
>&
observations
,
const
Eigen
::
VectorXd
&
noises
)
const
Eigen
::
VectorXd
&
noises
,
bool
compute_kernel
=
true
)
{
assert
(
samples
.
size
()
!=
0
);
assert
(
observations
.
size
()
!=
0
);
...
...
@@ -100,7 +100,8 @@ namespace limbo {
_noises
=
noises
;
this
->
_compute_obs_mean
();
this
->
_compute_full_kernel
();
if
(
compute_kernel
)
this
->
_compute_full_kernel
();
}
/// Do not forget to call this if you use hyper-prameters optimization!!
...
...
src/tutorials/gp.cpp
View file @
5755523d
...
...
@@ -118,7 +118,7 @@ int main(int argc, char** argv)
GP2_t
gp_ard
(
1
,
1
);
// do not forget to call the optimization!
gp_ard
.
compute
(
samples
,
observations
,
noises
);
gp_ard
.
compute
(
samples
,
observations
,
noises
,
false
);
gp_ard
.
optimize_hyperparams
();
// write the predicted data in a file (e.g. to be plotted)
...
...
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