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
363bbc22
Commit
363bbc22
authored
Jul 06, 2018
by
Konstantinos Chatzilygeroudis
Browse files
Fixes #278
parent
4b8ede53
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/limbo/model/gp.hpp
View file @
363bbc22
...
...
@@ -408,14 +408,31 @@ namespace limbo {
void
set_log_loo_cv
(
double
log_loo_cv
)
{
_log_loo_cv
=
log_loo_cv
;
}
/// LLT matrix (from Cholesky decomposition)
//const Eigen::LLT<Eigen::MatrixXd>& llt() const { return _llt; }
const
Eigen
::
MatrixXd
&
matrixL
()
const
{
return
_matrixL
;
}
const
Eigen
::
MatrixXd
&
alpha
()
const
{
return
_alpha
;
}
/// return the list of samples
that have been tested so far
/// return the list of samples
const
std
::
vector
<
Eigen
::
VectorXd
>&
samples
()
const
{
return
_samples
;
}
/// return the list of observations
std
::
vector
<
Eigen
::
VectorXd
>
observations
()
const
{
std
::
vector
<
Eigen
::
VectorXd
>
observations
;
for
(
int
i
=
0
;
i
<
_observations
.
rows
();
i
++
)
{
observations
.
push_back
(
_observations
.
row
(
i
));
}
return
observations
;
}
/// return the observations (in matrix form)
/// (NxD), where N is the number of points and D is the dimension output
const
Eigen
::
MatrixXd
&
observations_matrix
()
const
{
return
_observations
;
}
bool
inv_kernel_computed
()
{
return
_inv_kernel_updated
;
}
/// save the parameters and the data for the GP to the archive (text or binary)
...
...
src/limbo/model/multi_gp.hpp
View file @
363bbc22
...
...
@@ -265,13 +265,32 @@ namespace limbo {
});
}
/// return the list of samples
that have been tested so far
/// return the list of samples
const
std
::
vector
<
Eigen
::
VectorXd
>&
samples
()
const
{
assert
(
_gp_models
.
size
());
return
_gp_models
[
0
].
samples
();
}
/// return the list of observations
const
std
::
vector
<
Eigen
::
VectorXd
>&
observations
()
const
{
return
_observations
;
}
/// return the observations (in matrix form)
/// (NxD), where N is the number of points and D is the dimension output
Eigen
::
MatrixXd
observations_matrix
()
const
{
assert
(
_dim_out
>
0
);
Eigen
::
MatrixXd
observations
(
_observations
.
size
(),
_dim_out
);
for
(
int
i
=
0
;
i
<
_observations
.
size
();
i
++
)
{
observations
.
row
(
i
)
=
_observations
[
i
];
}
return
observations
;
}
/// return the mean observation
Eigen
::
VectorXd
mean_observation
()
const
{
...
...
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